docstring_tokens
sequence
code_tokens
sequence
[ "register", "the", "annotation", "-", "declared", "default", "values", "for", "the", "given", "attributes", ",", "if", "available" ]
[ "public", "static", "void", "register", "default", "values", "(", "annotation", "attributes", "attributes", ")", "{", "class", "<", "?", "extends", "annotation", ">", "annotation", "type", "=", "attributes", "annotation", "type", "(", ")", ";", "if", "(", "annotation", "type", "!", "=", "null", "&", "&", "modifier", "is", "public", "(", "annotation", "type", "get", "modifiers", "(", ")", ")", "&", "&", "!", "annotation", "filter", "plain", "matches", "(", "annotation", "type", ")", ")", "{", "map", "<", "string", ",", "default", "value", "holder", ">", "default", "values", "=", "get", "default", "values", "(", "annotation", "type", ")", ";", "default", "values", "for", "each", "(", "attributes", ":", ":", "put", "if", "absent", ")", ";", "}", "}" ]
[ "gets", "credential", "selection", "predicate" ]
[ "public", "static", "predicate", "<", "credential", ">", "new", "credential", "selection", "predicate", "(", "final", "string", "selection", "criteria", ")", "{", "try", "{", "if", "(", "string", "utils", "is", "blank", "(", "selection", "criteria", ")", ")", "{", "return", "credential", "-", ">", "true", ";", "}", "if", "(", "selection", "criteria", "ends", "with", "(", "\"", "groovy", "\"", ")", ")", "{", "val", "loader", "=", "new", "default", "resource", "loader", "(", ")", ";", "val", "resource", "=", "loader", "get", "resource", "(", "selection", "criteria", ")", ";", "val", "script", "=", "i", "o", "utils", "to", "string", "(", "resource", "get", "input", "stream", "(", ")", ",", "standard", "charsets", "utf", "8", ")", ";", "val", "clz", "=", "access", "controller", "do", "privileged", "(", "(", "privileged", "action", "<", "class", "<", "predicate", ">", ">", ")", "(", ")", "-", ">", "{", "val", "class", "loader", "=", "new", "groovy", "class", "loader", "(", "beans", "class", "get", "class", "loader", "(", ")", ",", "new", "compiler", "configuration", "(", ")", ",", "true", ")", ";", "return", "class", "loader", "parse", "class", "(", "script", ")", ";", "}", ")", ";", "return", "clz", "get", "declared", "constructor", "(", ")", "new", "instance", "(", ")", ";", "}", "val", "predicate", "clazz", "=", "class", "utils", "get", "class", "(", "selection", "criteria", ")", ";", "return", "(", "predicate", "<", "org", "apereo", "cas", "authentication", "credential", ">", ")", "predicate", "clazz", "get", "declared", "constructor", "(", ")", "new", "instance", "(", ")", ";", "}", "catch", "(", "final", "exception", "e", ")", "{", "val", "predicate", "=", "pattern", "compile", "(", "selection", "criteria", ")", "as", "predicate", "(", ")", ";", "return", "credential", "-", ">", "predicate", "test", "(", "credential", "get", "id", "(", ")", ")", ";", "}", "}" ]
[ "reads", "and", "discards", "data", "from", "the", "given", "{", "@", "code", "readable", "}", "until", "the", "end", "of", "the", "stream", "is", "reached", "returns", "the", "total", "number", "of", "chars", "read", "does", "not", "close", "the", "stream" ]
[ "public", "static", "long", "exhaust", "(", "readable", "readable", ")", "throws", "i", "o", "exception", "{", "long", "total", "=", "0", ";", "long", "read", ";", "char", "buffer", "buf", "=", "create", "buffer", "(", ")", ";", "while", "(", "(", "read", "=", "readable", "read", "(", "buf", ")", ")", "!", "=", "-", "1", ")", "{", "total", "+", "=", "read", ";", "java", "8", "compatibility", "clear", "(", "buf", ")", ";", "}", "return", "total", ";", "}" ]
[ "turns", "the", "given", "iterable", "into", "a", "new", "set", ",", "returning", "it", "directly", "if", "it", "is", "a", "set", ",", "draining", "it", "into", "a", "set", "if", "it", "is", "not", "already" ]
[ "public", "static", "<", "t", ">", "set", "<", "t", ">", "as", "set", "(", "iterable", "<", "t", ">", "iterable", ")", "{", "if", "(", "iterable", "instanceof", "set", ")", "{", "return", "(", "set", "<", "t", ">", ")", "iterable", ";", "}", "set", "<", "t", ">", "set", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "if", "(", "iterable", "=", "=", "null", ")", "{", "return", "set", ";", "}", "iterator", "<", "t", ">", "it", "=", "iterable", "iterator", "(", ")", ";", "while", "(", "it", "has", "next", "(", ")", ")", "{", "t", "t", "=", "it", "next", "(", ")", ";", "set", "add", "(", "t", ")", ";", "}", "return", "set", ";", "}" ]
[ "set", "rules", "of", "the", "machine", "rules", "=", "=", "null", "will", "return", "immediately", ";", "rules", "is", "empty", "(", ")", "means", "setting", "the", "rules", "to", "empty" ]
[ "public", "boolean", "set", "degrade", "rule", "of", "machine", "(", "string", "app", ",", "string", "ip", ",", "int", "port", ",", "list", "<", "degrade", "rule", "entity", ">", "rules", ")", "{", "return", "set", "rules", "(", "app", ",", "ip", ",", "port", ",", "degrade", "rule", "type", ",", "rules", ")", ";", "}" ]
[ "add", "a", "form", "element" ]
[ "form", "form", "(", "string", "selector", ")", ";" ]
[ "add", "branch", "session", "test" ]
[ "public", "void", "add", "branch", "session", "test", "(", "global", "session", "global", "session", ",", "branch", "session", "branch", "session", ")", "throws", "exception", "{", "for", "(", "session", "manager", "session", "manager", ":", "session", "manager", "list", ")", "{", "session", "manager", "add", "global", "session", "(", "global", "session", ")", ";", "session", "manager", "add", "branch", "session", "(", "global", "session", ",", "branch", "session", ")", ";", "session", "manager", "remove", "branch", "session", "(", "global", "session", ",", "branch", "session", ")", ";", "session", "manager", "remove", "global", "session", "(", "global", "session", ")", ";", "}", "}" ]
[ "string", "representation", "of", "the", "node", "id", "typically", "the", "integer", "id", "is", "used", "to", "serialize", "over", "the", "wire", ",", "the", "string", "representation", "is", "used", "as", "an", "identifier", "with", "network", "client", "code" ]
[ "public", "string", "id", "string", "(", ")", "{", "return", "id", "string", ";", "}" ]
[ "removes", "all", "targets", "from", "the", "comparison" ]
[ "public", "void", "clear", "targets", "(", ")", "{", "targets", "clear", "(", ")", ";", "}" ]
[ "test", "the", "property", "'", "$", "special", "property", "name", "'" ]
[ "public", "void", "$", "special", "property", "name", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "$", "special", "property", "name", "}" ]
[ "gets", "the", "instance", "for", "the", "final", "instruction", "of", "the", "block", "with", "the", "given", "label" ]
[ "public", "code", "address", "get", "last", "(", "int", "label", ")", "{", "return", "lasts", "[", "label", "]", ";", "}" ]
[ "removes", "an", "original", "composite", "listener", "that", "was", "being", "notified", "when", "changes", "occur" ]
[ "public", "void", "remove", "original", "composite", "listener", "(", "original", "composite", "listener", "listener", ")", "{", "original", "listeners", "remove", "(", "listener", ")", ";", "}" ]
[ "invoke", "any", "(", "c", ")", "returns", "result", "of", "some", "task", "in", "c", "if", "at", "least", "one", "completes" ]
[ "public", "void", "test", "invoke", "any", "impl", "(", ")", "throws", "exception", "{", "listening", "executor", "service", "e", "=", "new", "direct", "executor", "service", "(", ")", ";", "try", "{", "list", "<", "callable", "<", "string", ">", ">", "l", "=", "new", "array", "list", "<", ">", "(", ")", ";", "l", "add", "(", "new", "string", "task", "(", ")", ")", ";", "l", "add", "(", "new", "string", "task", "(", ")", ")", ";", "string", "result", "=", "invoke", "any", "impl", "(", "e", ",", "l", ",", "false", ",", "0", ",", "time", "unit", "nanoseconds", ")", ";", "assert", "same", "(", "test", "string", ",", "result", ")", ";", "}", "finally", "{", "join", "pool", "(", "e", ")", ";", "}", "}" ]
[ "canonicalize", "the", "given", "uri", "this", "strips", "out", "login", "information" ]
[ "public", "static", "uri", "canonicalize", "uri", "(", "final", "uri", "uri", ",", "final", "int", "default", "port", ")", "{", "uri", "new", "uri", "=", "uri", ";", "if", "(", "uri", "get", "port", "(", ")", "=", "=", "-", "1", "&", "&", "default", "port", ">", "0", ")", "{", "/", "/", "reconstruct", "the", "uri", "with", "the", "default", "port", "set", "try", "{", "new", "uri", "=", "new", "uri", "(", "new", "uri", "get", "scheme", "(", ")", ",", "null", ",", "new", "uri", "get", "host", "(", ")", ",", "default", "port", ",", "new", "uri", "get", "path", "(", ")", ",", "new", "uri", "get", "query", "(", ")", ",", "new", "uri", "get", "fragment", "(", ")", ")", ";", "}", "catch", "(", "u", "r", "i", "syntax", "exception", "e", ")", "{", "/", "/", "should", "never", "happen", "!", "throw", "new", "assertion", "error", "(", "\"", "valid", "uri", "became", "unparseable", ":", "\"", "+", "new", "uri", ")", ";", "}", "}", "return", "new", "uri", ";", "}" ]
[ "updates", "the", "length", "values", "for", "the", "source", "and", "dest", "functions", "or", "data", "in", "the", "v", "t", "match", "info", "object" ]
[ "private", "static", "void", "update", "v", "t", "source", "and", "destination", "lengths", "(", "v", "t", "match", "info", "match", "info", ")", "{", "v", "t", "session", "session", "=", "match", "info", "get", "match", "set", "(", ")", "get", "session", "(", ")", ";", "program", "source", "program", "=", "session", "get", "source", "program", "(", ")", ";", "program", "destination", "program", "=", "session", "get", "destination", "program", "(", ")", ";", "address", "source", "address", "=", "match", "info", "get", "source", "address", "(", ")", ";", "address", "destination", "address", "=", "match", "info", "get", "destination", "address", "(", ")", ";", "if", "(", "match", "info", "get", "association", "type", "(", ")", "=", "=", "v", "t", "association", "type", "function", ")", "{", "function", "source", "function", "=", "source", "program", "get", "function", "manager", "(", ")", "get", "function", "at", "(", "source", "address", ")", ";", "function", "dest", "function", "=", "destination", "program", "get", "function", "manager", "(", ")", "get", "function", "at", "(", "destination", "address", ")", ";", "if", "(", "source", "function", "!", "=", "null", ")", "{", "match", "info", "set", "source", "length", "(", "(", "int", ")", "source", "function", "get", "body", "(", ")", "get", "num", "addresses", "(", ")", ")", ";", "}", "if", "(", "dest", "function", "!", "=", "null", ")", "{", "match", "info", "set", "destination", "length", "(", "(", "int", ")", "dest", "function", "get", "body", "(", ")", "get", "num", "addresses", "(", ")", ")", ";", "}", "}", "else", "{", "code", "unit", "cu", "=", "source", "program", "get", "listing", "(", ")", "get", "code", "unit", "containing", "(", "source", "address", ")", ";", "if", "(", "cu", "!", "=", "null", ")", "{", "match", "info", "set", "source", "length", "(", "cu", "get", "length", "(", ")", ")", ";", "}", "cu", "=", "destination", "program", "get", "listing", "(", ")", "get", "code", "unit", "containing", "(", "destination", "address", ")", ";", "if", "(", "cu", "!", "=", "null", ")", "{", "match", "info", "set", "destination", "length", "(", "cu", "get", "length", "(", ")", ")", ";", "}", "}", "}" ]
[ "escapes", "the", "specified", "value", ",", "if", "necessary", "according", "to", "<", "a", "href", "=", "\"", "https", ":", "tools", "ietf", "orghtmlrfc", "4", "1", "8", "0", "#", "section", "-", "2", "\"", ">", "rfc", "-", "4180" ]
[ "public", "static", "char", "sequence", "escape", "csv", "(", "char", "sequence", "value", ",", "boolean", "trim", "white", "space", ")", "{", "int", "length", "=", "check", "not", "null", "(", "value", ",", "\"", "value", "\"", ")", "length", "(", ")", ";", "int", "start", ";", "int", "last", ";", "if", "(", "trim", "white", "space", ")", "{", "start", "=", "index", "of", "first", "non", "ows", "char", "(", "value", ",", "length", ")", ";", "last", "=", "index", "of", "last", "non", "ows", "char", "(", "value", ",", "start", ",", "length", ")", ";", "}", "else", "{", "start", "=", "0", ";", "last", "=", "length", "-", "1", ";", "}", "if", "(", "start", ">", "last", ")", "{", "return", "empty", "string", ";", "}", "int", "first", "unescaped", "special", "=", "-", "1", ";", "boolean", "quoted", "=", "false", ";", "if", "(", "is", "double", "quote", "(", "value", "char", "at", "(", "start", ")", ")", ")", "{", "quoted", "=", "is", "double", "quote", "(", "value", "char", "at", "(", "last", ")", ")", "&", "&", "last", ">", "start", ";", "if", "(", "quoted", ")", "{", "start", "+", "+", ";", "last", "-", "-", ";", "}", "else", "{", "first", "unescaped", "special", "=", "start", ";", "}", "}", "if", "(", "first", "unescaped", "special", "<", "0", ")", "{", "if", "(", "quoted", ")", "{", "for", "(", "int", "i", "=", "start", ";", "i", "<", "=", "last", ";", "i", "+", "+", ")", "{", "if", "(", "is", "double", "quote", "(", "value", "char", "at", "(", "i", ")", ")", ")", "{", "if", "(", "i", "=", "=", "last", "|", "|", "!", "is", "double", "quote", "(", "value", "char", "at", "(", "i", "+", "1", ")", ")", ")", "{", "first", "unescaped", "special", "=", "i", ";", "break", ";", "}", "i", "+", "+", ";", "}", "}", "}", "else", "{", "for", "(", "int", "i", "=", "start", ";", "i", "<", "=", "last", ";", "i", "+", "+", ")", "{", "char", "c", "=", "value", "char", "at", "(", "i", ")", ";", "if", "(", "c", "=", "=", "line", "feed", "|", "|", "c", "=", "=", "carriage", "return", "|", "|", "c", "=", "=", "comma", ")", "{", "first", "unescaped", "special", "=", "i", ";", "break", ";", "}", "if", "(", "is", "double", "quote", "(", "c", ")", ")", "{", "if", "(", "i", "=", "=", "last", "|", "|", "!", "is", "double", "quote", "(", "value", "char", "at", "(", "i", "+", "1", ")", ")", ")", "{", "first", "unescaped", "special", "=", "i", ";", "break", ";", "}", "i", "+", "+", ";", "}", "}", "}", "if", "(", "first", "unescaped", "special", "<", "0", ")", "{", "/", "/", "special", "characters", "is", "not", "found", "or", "all", "of", "them", "already", "escaped", "/", "/", "in", "the", "most", "cases", "returns", "a", "same", "string", "new", "string", "will", "be", "instantiated", "(", "via", "string", "builder", ")", "/", "/", "only", "if", "it", "really", "needed", "it", "'", "s", "important", "to", "prevent", "gc", "extra", "load", "return", "quoted", "?", "value", "sub", "sequence", "(", "start", "-", "1", ",", "last", "+", "2", ")", ":", "value", "sub", "sequence", "(", "start", ",", "last", "+", "1", ")", ";", "}", "}", "string", "builder", "result", "=", "new", "string", "builder", "(", "last", "-", "start", "+", "1", "+", "csv", "number", "escape", "characters", ")", ";", "result", "append", "(", "double", "quote", ")", "append", "(", "value", ",", "start", ",", "first", "unescaped", "special", ")", ";", "for", "(", "int", "i", "=", "first", "unescaped", "special", ";", "i", "<", "=", "last", ";", "i", "+", "+", ")", "{", "char", "c", "=", "value", "char", "at", "(", "i", ")", ";", "if", "(", "is", "double", "quote", "(", "c", ")", ")", "{", "result", "append", "(", "double", "quote", ")", ";", "if", "(", "i", "<", "last", "&", "&", "is", "double", "quote", "(", "value", "char", "at", "(", "i", "+", "1", ")", ")", ")", "{", "i", "+", "+", ";", "}", "}", "result", "append", "(", "c", ")", ";", "}", "return", "result", "append", "(", "double", "quote", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "get", "metainfo", "for", "a", "kinesis", "stream", ",", "which", "contains", "information", "about", "which", "shards", "this", "kinesis", "stream", "possess", "this", "method", "is", "using", "a", "\"", "full", "jitter", "\"", "approach", "described", "in", "aws", "'", "s", "article", ",", "<", "a", "href", "=", "\"", "https", ":", "www", "awsarchitectureblog", "com", "2", "0", "1", "5", "0", "3backoff", "html", "\"", ">", "\"", "exponential", "backoff", "and", "jitter", "\"", "this", "is", "necessary", "because", "concurrent", "calls", "will", "be", "made", "by", "all", "parallel", "subtask", "'", "s", "fetcher", "this", "jitter", "backoff", "approach", "will", "help", "distribute", "calls", "across", "the", "fetchers", "over", "time" ]
[ "private", "list", "shards", "result", "list", "shards", "(", "string", "stream", "name", ",", "@", "nullable", "string", "start", "shard", "id", ",", "@", "nullable", "string", "start", "next", "token", ")", "throws", "interrupted", "exception", "{", "final", "list", "shards", "request", "list", "shards", "request", "=", "new", "list", "shards", "request", "(", ")", ";", "if", "(", "start", "next", "token", "=", "=", "null", ")", "{", "list", "shards", "request", "set", "exclusive", "start", "shard", "id", "(", "start", "shard", "id", ")", ";", "list", "shards", "request", "set", "stream", "name", "(", "stream", "name", ")", ";", "}", "else", "{", "/", "/", "note", "the", "next", "token", "returned", "by", "aws", "expires", "within", "300", "sec", "list", "shards", "request", "set", "next", "token", "(", "start", "next", "token", ")", ";", "}", "list", "shards", "result", "list", "shards", "results", "=", "null", ";", "/", "/", "call", "list", "shards", ",", "with", "full", "-", "jitter", "backoff", "(", "if", "we", "get", "limit", "exceeded", "exception", ")", "int", "retry", "count", "=", "0", ";", "/", "/", "list", "shards", "returns", "just", "the", "first", "1000", "shard", "entries", "make", "sure", "that", "all", "entries", "/", "/", "are", "taken", "up", "while", "(", "retry", "count", "<", "=", "list", "shards", "max", "retries", "&", "&", "list", "shards", "results", "=", "=", "null", ")", "{", "/", "/", "retry", "until", "we", "get", "a", "result", "try", "{", "list", "shards", "results", "=", "kinesis", "client", "list", "shards", "(", "list", "shards", "request", ")", ";", "}", "catch", "(", "limit", "exceeded", "exception", "le", ")", "{", "long", "backoff", "millis", "=", "backoff", "calculate", "full", "jitter", "backoff", "(", "list", "shards", "base", "backoff", "millis", ",", "list", "shards", "max", "backoff", "millis", ",", "list", "shards", "exp", "constant", ",", "retry", "count", "+", "+", ")", ";", "log", "warn", "(", "\"", "got", "limit", "exceeded", "exception", "when", "listing", "shards", "from", "stream", "\"", "+", "stream", "name", "+", "\"", "backing", "off", "for", "\"", "+", "backoff", "millis", "+", "\"", "millis", "\"", ")", ";", "backoff", "sleep", "(", "backoff", "millis", ")", ";", "}", "catch", "(", "resource", "in", "use", "exception", "re", "in", "use", ")", "{", "if", "(", "log", "is", "warn", "enabled", "(", ")", ")", "{", "/", "/", "list", "shards", "will", "throw", "an", "exception", "if", "stream", "in", "not", "in", "active", "state", "return", "/", "/", "and", "re", "-", "use", "previous", "state", "available", "log", "info", "(", "\"", "the", "stream", "is", "currently", "not", "in", "active", "state", "reusing", "the", "older", "state", "\"", "+", "\"", "for", "the", "time", "being", "\"", ")", ";", "break", ";", "}", "}", "catch", "(", "resource", "not", "found", "exception", "re", "not", "found", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "stream", "not", "found", "error", "while", "getting", "shard", "list", "\"", ",", "re", "not", "found", ")", ";", "}", "catch", "(", "invalid", "argument", "exception", "in", "arg", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "invalid", "arguments", "to", "list", "shards", "\"", ",", "in", "arg", ")", ";", "}", "catch", "(", "expired", "next", "token", "exception", "expired", "token", ")", "{", "log", "warn", "(", "\"", "list", "shards", "has", "an", "expired", "token", "reusing", "the", "previous", "state", "\"", ")", ";", "break", ";", "}", "catch", "(", "sdk", "client", "exception", "ex", ")", "{", "if", "(", "retry", "count", "<", "list", "shards", "max", "retries", "&", "&", "is", "recoverable", "sdk", "client", "exception", "(", "ex", ")", ")", "{", "long", "backoff", "millis", "=", "backoff", "calculate", "full", "jitter", "backoff", "(", "list", "shards", "base", "backoff", "millis", ",", "list", "shards", "max", "backoff", "millis", ",", "list", "shards", "exp", "constant", ",", "retry", "count", "+", "+", ")", ";", "log", "warn", "(", "\"", "got", "sdk", "client", "exception", "when", "listing", "shards", "from", "stream", "{", "}", "backing", "off", "for", "{", "}", "millis", "\"", ",", "stream", "name", ",", "backoff", "millis", ")", ";", "backoff", "sleep", "(", "backoff", "millis", ")", ";", "}", "else", "{", "/", "/", "propagate", "if", "retries", "exceeded", "or", "not", "recoverable", "/", "/", "(", "otherwise", "would", "return", "null", "result", "and", "keep", "trying", "forever", ")", "throw", "ex", ";", "}", "}", "}", "/", "/", "kinesalite", "(", "mock", "implementation", "of", "kinesis", ")", "does", "not", "correctly", "exclude", "shards", "before", "/", "/", "the", "exclusive", "start", "shard", "id", "in", "the", "returned", "shards", "list", ";", "check", "if", "we", "need", "to", "remove", "/", "/", "these", "erroneously", "returned", "shards", "/", "/", "related", "issues", ":", "/", "/", "https", ":", "/", "/", "github", "com", "/", "mhart", "/", "kinesalite", "/", "pull", "/", "77", "/", "/", "https", ":", "/", "/", "github", "com", "/", "lyft", "/", "kinesalite", "/", "pull", "/", "4", "if", "(", "start", "shard", "id", "!", "=", "null", "&", "&", "list", "shards", "results", "!", "=", "null", ")", "{", "list", "<", "shard", ">", "shards", "=", "list", "shards", "results", "get", "shards", "(", ")", ";", "shards", "remove", "if", "(", "shard", "-", ">", "stream", "shard", "handle", "compare", "shard", "ids", "(", "shard", "get", "shard", "id", "(", ")", ",", "start", "shard", "id", ")", "<", "=", "0", ")", ";", "}", "return", "list", "shards", "results", ";", "}" ]
[ "test", "the", "property", "'", "direct", "map", "'" ]
[ "public", "void", "direct", "map", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "direct", "map", "}" ]
[ "return", "the", "sort", "order", "of", "this", "index", ",", "or", "null", "if", "the", "index", "has", "no", "sort" ]
[ "public", "sort", "get", "index", "sort", "(", ")", "{", "return", "index", "sort", "supplier", "get", "(", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "current", "system", "time", "do", "not", "use", "this", "to", "calculate", "a", "duration", "or", "interval", "to", "sleep", ",", "because", "it", "will", "be", "broken", "by", "settimeofday", "instead", ",", "use", "monotonic", "now" ]
[ "public", "static", "long", "now", "(", ")", "{", "return", "system", "current", "time", "millis", "(", ")", ";", "}" ]
[ "returns", "the", "fetch", "result", "iff", "it", "'", "s", "included", "in", "this", "response", "otherwise", "<", "code", ">", "null", "<", "code", ">" ]
[ "public", "fetch", "search", "result", "fetch", "result", "(", ")", "{", "return", "null", ";", "}" ]
[ "the", "report", "below", "shows", "this", "pattern", "match", "performance", "is", "much", "about", "rule", "numbers", "this", "is", "a", "single", "thread", "test" ]
[ "public", "void", "performance", "benchmark", "(", ")", "throws", "runner", "exception", "{", "options", "opt", "=", "new", "options", "builder", "(", ")", "include", "(", "string", "format", "group", "test", "class", "get", "simple", "name", "(", ")", ")", "forks", "(", "1", ")", "warmup", "iterations", "(", "0", ")", "measurement", "iterations", "(", "5", ")", "build", "(", ")", ";", "new", "runner", "(", "opt", ")", "run", "(", ")", ";", "}" ]
[ "same", "test", "as", "above", "but", "for", "new", "linked", "hash", "map", "with", "expected", "size" ]
[ "public", "void", "test", "new", "linked", "hash", "map", "with", "expected", "size", "wont", "grow", "(", ")", "throws", "exception", "{", "assert", "true", "(", "buckets", "of", "(", "maps", "new", "linked", "hash", "map", "with", "expected", "size", "(", "0", ")", ")", "<", "=", "1", ")", ";", "for", "(", "int", "size", "=", "1", ";", "size", "<", "200", ";", "size", "+", "+", ")", "{", "assert", "wont", "grow", "(", "size", ",", "maps", "new", "linked", "hash", "map", "with", "expected", "size", "(", "size", ")", ",", "maps", "new", "linked", "hash", "map", "with", "expected", "size", "(", "size", ")", ")", ";", "}", "}" ]
[ "check", "if", "uri", "represents", "local", "resource" ]
[ "public", "static", "boolean", "is", "local", "resource", "uri", "(", "@", "nullable", "uri", "uri", ")", "{", "final", "string", "scheme", "=", "get", "scheme", "or", "null", "(", "uri", ")", ";", "return", "local", "resource", "scheme", "equals", "(", "scheme", ")", ";", "}" ]
[ "returns", "the", "specific", "double", "value", ",", "if", "applicable" ]
[ "public", "double", "value", "(", ")", "{", "return", "0", "0", ";", "}" ]
[ "datasource", "which", "this", "object", "belongs", "it", "can", "be", "null", "if", "object", "was", "detached", "from", "data", "source" ]
[ "d", "b", "p", "data", "source", "get", "data", "source", "(", ")", ";" ]
[ "suspends", "the", "current", "execution", "graph", "the", "job", "status", "will", "be", "directly", "set", "to", "{", "@", "link", "job", "status", "#", "suspended", "}", "iff", "the", "current", "state", "is", "not", "a", "terminal", "state", "all", "execution", "job", "vertices", "will", "be", "canceled", "and", "the", "on", "terminal", "state", "(", ")", "is", "executed", "the", "{", "@", "link", "job", "status", "#", "suspended", "}", "state", "is", "a", "local", "terminal", "state", "which", "stops", "the", "execution", "of", "the", "job", "but", "does", "not", "remove", "the", "job", "from", "the", "ha", "job", "store", "so", "that", "it", "can", "be", "recovered", "by", "another", "job", "manager" ]
[ "public", "void", "suspend", "(", "throwable", "suspension", "cause", ")", "{", "assert", "running", "in", "job", "master", "main", "thread", "(", ")", ";", "if", "(", "state", "is", "terminal", "state", "(", ")", ")", "{", "/", "/", "stay", "in", "a", "terminal", "state", "return", ";", "}", "else", "if", "(", "transition", "state", "(", "state", ",", "job", "status", "suspended", ",", "suspension", "cause", ")", ")", "{", "init", "failure", "cause", "(", "suspension", "cause", ")", ";", "/", "/", "make", "sure", "no", "concurrent", "local", "actions", "interfere", "with", "the", "cancellation", "increment", "global", "mod", "version", "(", ")", ";", "/", "/", "cancel", "ongoing", "scheduling", "action", "if", "(", "scheduling", "future", "!", "=", "null", ")", "{", "scheduling", "future", "cancel", "(", "false", ")", ";", "}", "final", "array", "list", "<", "completable", "future", "<", "void", ">", ">", "execution", "job", "vertex", "termination", "futures", "=", "new", "array", "list", "<", ">", "(", "vertices", "in", "creation", "order", "size", "(", ")", ")", ";", "for", "(", "execution", "job", "vertex", "ejv", ":", "vertices", "in", "creation", "order", ")", "{", "execution", "job", "vertex", "termination", "futures", "add", "(", "ejv", "suspend", "(", ")", ")", ";", "}", "final", "conjunct", "future", "<", "void", ">", "job", "vertices", "termination", "future", "=", "future", "utils", "wait", "for", "all", "(", "execution", "job", "vertex", "termination", "futures", ")", ";", "check", "state", "(", "job", "vertices", "termination", "future", "is", "done", "(", ")", ",", "\"", "suspend", "needs", "to", "happen", "atomically", "\"", ")", ";", "job", "vertices", "termination", "future", "when", "complete", "(", "(", "void", "ignored", ",", "throwable", "throwable", ")", "-", ">", "{", "if", "(", "throwable", "!", "=", "null", ")", "{", "log", "debug", "(", "\"", "could", "not", "properly", "suspend", "the", "execution", "graph", "\"", ",", "throwable", ")", ";", "}", "on", "terminal", "state", "(", "state", ")", ";", "log", "info", "(", "\"", "job", "{", "}", "has", "been", "suspended", "\"", ",", "get", "job", "i", "d", "(", ")", ")", ";", "}", ")", ";", "}", "else", "{", "throw", "new", "illegal", "state", "exception", "(", "string", "format", "(", "\"", "could", "not", "suspend", "because", "transition", "from", "%", "s", "to", "%", "s", "failed", "\"", ",", "state", ",", "job", "status", "suspended", ")", ")", ";", "}", "}" ]
[ "sets", "the", "optional", "custom", "cache", "key", "(", "only", "used", "for", "progressive", "streams", ")", "if", "{", "@", "link", "#", "set", "uri", "}", "is", "passed", "a", "non", "-", "null", "{", "@", "code", "uri", "}", ",", "the", "custom", "cache", "key", "is", "used", "to", "create", "a", "{", "@", "link", "playback", "properties", "}", "object", "otherwise", "it", "will", "be", "ignored" ]
[ "public", "builder", "set", "custom", "cache", "key", "(", "@", "nullable", "string", "custom", "cache", "key", ")", "{", "this", "custom", "cache", "key", "=", "custom", "cache", "key", ";", "return", "this", ";", "}" ]
[ "remove", "the", "key", "for", "a", "given", "alias" ]
[ "public", "void", "remove", "secret", "key", "(", "text", "alias", ")", "{", "secret", "keys", "map", "remove", "(", "alias", ")", ";", "}" ]
[ "starts", "the", "service", "if", "not", "started", "already", "and", "removes", "a", "download" ]
[ "public", "static", "void", "send", "remove", "download", "(", "context", "context", ",", "class", "<", "?", "extends", "download", "service", ">", "clazz", ",", "string", "id", ",", "boolean", "foreground", ")", "{", "intent", "intent", "=", "build", "remove", "download", "intent", "(", "context", ",", "clazz", ",", "id", ",", "foreground", ")", ";", "start", "service", "(", "context", ",", "intent", ",", "foreground", ")", ";", "}" ]
[ "returns", "the", "segments", "file", "that", "this", "metadata", "snapshot", "represents", "or", "null", "if", "the", "snapshot", "is", "empty" ]
[ "public", "store", "file", "metadata", "get", "segments", "file", "(", ")", "{", "for", "(", "store", "file", "metadata", "file", ":", "this", ")", "{", "if", "(", "file", "name", "(", ")", "starts", "with", "(", "index", "file", "names", "segments", ")", ")", "{", "return", "file", ";", "}", "}", "assert", "metadata", "is", "empty", "(", ")", ";", "return", "null", ";", "}" ]
[ "sets", "whether", "animation", "position", "is", "saved", "in", "{", "@", "link", "#", "on", "save", "instance", "state", "(", ")", "}", "and", "restored", "in", "{", "@", "link", "#", "on", "restore", "instance", "state", "(", "parcelable", ")", "}", "this", "is", "applicable", "to", "all", "compound", "drawables" ]
[ "public", "void", "set", "freezes", "animation", "(", "boolean", "freezes", "animation", ")", "{", "view", "attributes", "freezes", "animation", "=", "freezes", "animation", ";", "}" ]
[ "creates", "a", "cluster", "state", "request" ]
[ "public", "static", "cluster", "state", "request", "cluster", "state", "request", "(", ")", "{", "return", "new", "cluster", "state", "request", "(", ")", ";", "}" ]
[ "test", "verifies", "that", "the", "server", "is", "able", "to", "redefine", "the", "minmax", "session", "timeouts" ]
[ "public", "void", "test", "min", "max", "session", "time", "out", "(", ")", "throws", "exception", "{", "client", "base", "setup", "test", "env", "(", ")", ";", "final", "int", "client", "port", "=", "port", "assignment", "unique", "(", ")", ";", "final", "int", "tick", "time", "=", "2000", ";", "final", "int", "min", "session", "timeout", "=", "tick", "time", "*", "2", "-", "100", ";", "final", "int", "max", "session", "timeout", "=", "20", "*", "tick", "time", "+", "1000", ";", "final", "string", "configs", "=", "\"", "max", "session", "timeout", "=", "\"", "+", "max", "session", "timeout", "+", "\"", "\\", "n", "\"", "+", "\"", "min", "session", "timeout", "=", "\"", "+", "min", "session", "timeout", "+", "\"", "\\", "n", "\"", ";", "main", "thread", "main", "=", "new", "main", "thread", "(", "client", "port", ",", "true", ",", "configs", ")", ";", "main", "start", "(", ")", ";", "string", "hostport", "=", "\"", "127", "0", "0", "1", ":", "\"", "+", "client", "port", ";", "assert", "true", "(", "client", "base", "wait", "for", "server", "up", "(", "hostport", ",", "connection", "timeout", ")", ",", "\"", "waiting", "for", "server", "being", "up", "\"", ")", ";", "/", "/", "create", "session", "with", "min", "value", "verify", "session", "time", "out", "(", "min", "session", "timeout", ",", "min", "session", "timeout", ",", "hostport", ")", ";", "verify", "session", "time", "out", "(", "min", "session", "timeout", "-", "2000", ",", "min", "session", "timeout", ",", "hostport", ")", ";", "/", "/", "create", "session", "with", "max", "value", "verify", "session", "time", "out", "(", "max", "session", "timeout", ",", "max", "session", "timeout", ",", "hostport", ")", ";", "verify", "session", "time", "out", "(", "max", "session", "timeout", "+", "2000", ",", "max", "session", "timeout", ",", "hostport", ")", ";", "main", "shutdown", "(", ")", ";", "assert", "true", "(", "client", "base", "wait", "for", "server", "down", "(", "hostport", ",", "client", "base", "connection", "timeout", ")", ",", "\"", "waiting", "for", "server", "down", "\"", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}", "if", "the", "data", "in", "the", "multiset", "is", "modified", "by", "any", "other", "threads", "during", "this", "method", ",", "it", "is", "undefined", "which", "(", "if", "any", ")", "of", "these", "modifications", "will", "be", "reflected", "in", "the", "result" ]
[ "public", "int", "size", "(", ")", "{", "long", "sum", "=", "0l", ";", "for", "(", "atomic", "integer", "value", ":", "count", "map", "values", "(", ")", ")", "{", "sum", "+", "=", "value", "get", "(", ")", ";", "}", "return", "ints", "saturated", "cast", "(", "sum", ")", ";", "}" ]
[ "execute", "an", "inline", "watch" ]
[ "public", "static", "execute", "watch", "request", "inline", "(", "string", "watch", "content", ")", "{", "return", "new", "execute", "watch", "request", "(", "null", ",", "objects", "require", "non", "null", "(", "watch", "content", ",", "\"", "watch", "content", "cannot", "be", "null", "\"", ")", ")", ";", "}" ]
[ "enter", "a", "parse", "tree", "produced", "by", "the", "{", "@", "code", "single", "grouping", "set", "}", "labeled", "alternative", "in", "{", "@", "link", "sql", "base", "parser", "#", "grouping", "element", "}" ]
[ "void", "enter", "single", "grouping", "set", "(", "sql", "base", "parser", "single", "grouping", "set", "context", "ctx", ")", ";" ]
[ "to", "test", "\\", "&", "quot", ";", "client", "\\", "&", "quot", ";", "model", "to", "test", "\\", "&", "quot", ";", "client", "\\", "&", "quot", ";", "model", "<", "b", ">", "200", "<", "b", ">", "-", "successful", "operation" ]
[ "public", "client", "test", "client", "model", "(", "client", "body", ",", "map", "<", "string", ",", "object", ">", "params", ")", "throws", "i", "o", "exception", "{", "http", "response", "response", "=", "test", "client", "model", "for", "http", "response", "(", "body", ",", "params", ")", ";", "type", "reference", "<", "client", ">", "type", "ref", "=", "new", "type", "reference", "<", "client", ">", "(", ")", "{", "}", ";", "return", "api", "client", "get", "object", "mapper", "(", ")", "read", "value", "(", "response", "get", "content", "(", ")", ",", "type", "ref", ")", ";", "}" ]
[ "construct", "an", "implementation", "of", "{", "@", "link", "hystrix", "metrics", "publisher", "collapser", "}", "for", "{", "@", "link", "hystrix", "collapser", "}", "instances", "having", "key", "{", "@", "link", "hystrix", "collapser", "key", "}", "this", "will", "be", "invoked", "once", "per", "{", "@", "link", "hystrix", "collapser", "key", "}", "instance", "<", "b", ">", "default", "implementation", "<", "b", ">", "return", "instance", "of", "{", "@", "link", "hystrix", "metrics", "publisher", "collapser", "default", "}" ]
[ "public", "hystrix", "metrics", "publisher", "collapser", "get", "metrics", "publisher", "for", "collapser", "(", "hystrix", "collapser", "key", "collapser", "key", ",", "hystrix", "collapser", "metrics", "metrics", ",", "hystrix", "collapser", "properties", "properties", ")", "{", "return", "new", "hystrix", "metrics", "publisher", "collapser", "default", "(", "collapser", "key", ",", "metrics", ",", "properties", ")", ";", "}" ]
[ "test", "a", "command", "execution", "that", "throws", "an", "hystrix", "exception", "and", "didn", "'", "t", "implement", "get", "fallback" ]
[ "public", "void", "test", "execution", "hystrix", "failure", "with", "no", "fallback", "(", ")", "{", "test", "hystrix", "command", "<", "integer", ">", "command", "=", "get", "command", "(", "execution", "isolation", "strategy", "thread", ",", "abstract", "test", "hystrix", "command", "execution", "result", "hystrix", "failure", ",", "abstract", "test", "hystrix", "command", "fallback", "result", "unimplemented", ")", ";", "try", "{", "command", "execute", "(", ")", ";", "fail", "(", "\"", "we", "shouldn", "'", "t", "get", "here", "\"", ")", ";", "}", "catch", "(", "hystrix", "runtime", "exception", "e", ")", "{", "e", "print", "stack", "trace", "(", ")", ";", "assert", "not", "null", "(", "e", "get", "fallback", "exception", "(", ")", ")", ";", "assert", "not", "null", "(", "e", "get", "implementing", "class", "(", ")", ")", ";", "}", "assert", "true", "(", "command", "get", "execution", "time", "in", "milliseconds", "(", ")", ">", "-", "1", ")", ";", "assert", "true", "(", "command", "is", "failed", "execution", "(", ")", ")", ";", "assert", "command", "execution", "events", "(", "command", ",", "hystrix", "event", "type", "failure", ",", "hystrix", "event", "type", "fallback", "missing", ")", ";", "assert", "not", "null", "(", "command", "get", "execution", "exception", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "command", "get", "builder", "(", ")", "metrics", "get", "current", "concurrent", "execution", "count", "(", ")", ")", ";", "assert", "sane", "hystrix", "request", "log", "(", "1", ")", ";", "}" ]
[ "whether", "the", "value", "can", "be", "overridden", "<", "code", ">", "optional", "bool", "weak", "=", "3", ";", "<", "code", ">" ]
[ "public", "builder", "clear", "weak", "(", ")", "{", "copy", "on", "write", "(", ")", ";", "instance", "clear", "weak", "(", ")", ";", "return", "this", ";", "}" ]
[ "set", "the", "validator", "factory", "to", "obtain", "the", "target", "validator", "from", "default", "is", "{", "@", "link", "javax", "validation", "validation", "#", "build", "default", "validator", "factory", "(", ")", "}" ]
[ "public", "void", "set", "validator", "factory", "(", "validator", "factory", "validator", "factory", ")", "{", "this", "validator", "factory", "=", "validator", "factory", ";", "}" ]
[ "return", "the", "wrapped", "bean", "definition", "object" ]
[ "public", "final", "bean", "definition", "get", "bean", "definition", "(", ")", "{", "return", "this", "bean", "definition", ";", "}" ]
[ "deletes", "the", "contents", "of", "the", "given", "directory", "(", "but", "not", "the", "directory", "itself", ")", "recursively", "it", "does", "not", "take", "no", "for", "an", "answer", "-", "if", "necessary", ",", "it", "will", "have", "multiple", "attempts", "at", "deleting", "things" ]
[ "public", "static", "void", "delete", "contents", "recursive", "(", "@", "non", "null", "file", "file", ")", "throws", "i", "o", "exception", "{", "delete", "contents", "recursive", "(", "file", "to", "path", "(", "file", ")", ",", "path", "remover", "path", "checker", "allow", "all", ")", ";", "}" ]
[ "return", "the", "configured", "parts", "reader" ]
[ "public", "http", "message", "reader", "<", "part", ">", "get", "part", "reader", "(", ")", "{", "return", "this", "part", "reader", ";", "}" ]
[ "creates", "a", "copy", "of", "the", "given", "collection", "with", "the", "given", "element", "appended" ]
[ "public", "static", "<", "e", ">", "list", "<", "e", ">", "append", "to", "copy", "(", "collection", "<", "e", ">", "collection", ",", "e", "element", ")", "{", "final", "int", "size", "=", "collection", "size", "(", ")", "+", "1", ";", "final", "e", "[", "]", "array", "=", "collection", "to", "array", "(", "(", "e", "[", "]", ")", "new", "object", "[", "size", "]", ")", ";", "array", "[", "size", "-", "1", "]", "=", "element", ";", "return", "arrays", "as", "list", "(", "array", ")", ";", "}" ]
[ "tells", "whether", "the", "target", "was", "compiled", "with", "hotpatch" ]
[ "public", "boolean", "is", "compiled", "with", "hot", "patch", "(", ")", "{", "return", "compiled", "with", "hot", "patch", ";", "}" ]
[ "returns", "the", "byte", "offset", "of", "the", "current", "sample" ]
[ "public", "long", "get", "current", "sample", "offset", "(", ")", "{", "return", "!", "currently", "in", "fragment", "?", "moov", "sample", "table", "offsets", "[", "current", "sample", "index", "]", ":", "fragment", "trun", "data", "position", "[", "current", "track", "run", "index", "]", ";", "}" ]
[ "<", "code", ">", "repeated", "org", "apache", "dubbo", "common", "serialize", "protobuf", "model", "phone", "number", "phone", "=", "8", ";", "<", "code", ">" ]
[ "public", "google", "p", "b", "phone", "number", "get", "phone", "(", "int", "index", ")", "{", "return", "phone", "get", "(", "index", ")", ";", "}" ]
[ "initializes", "{", "@", "link", "image", "pipeline", "factory", "}", "with", "the", "specified", "config" ]
[ "public", "static", "synchronized", "void", "initialize", "(", "image", "pipeline", "config", "image", "pipeline", "config", ",", "boolean", "force", "single", "pipeline", "instance", ")", "{", "if", "(", "s", "instance", "!", "=", "null", ")", "{", "f", "log", "w", "(", "tag", ",", "\"", "image", "pipeline", "factory", "has", "already", "been", "initialized", "!", "`", "image", "pipeline", "factory", "initialize", "(", ")", "`", "should", "only", "be", "called", "once", "to", "avoid", "unexpected", "behavior", "\"", ")", ";", "}", "s", "force", "single", "pipeline", "instance", "=", "force", "single", "pipeline", "instance", ";", "s", "instance", "=", "new", "image", "pipeline", "factory", "(", "image", "pipeline", "config", ")", ";", "}" ]
[ "returns", "the", "corresponding", "wrapper", "type", "if", "this", "is", "a", "primitive", "type", ";", "otherwise", "returns", "{", "@", "code", "this", "}", "itself", "idempotent" ]
[ "public", "final", "type", "token", "<", "t", ">", "wrap", "(", ")", "{", "if", "(", "is", "primitive", "(", ")", ")", "{", "@", "suppress", "warnings", "(", "\"", "unchecked", "\"", ")", "/", "/", "this", "is", "a", "primitive", "class", "class", "<", "t", ">", "type", "=", "(", "class", "<", "t", ">", ")", "runtime", "type", ";", "return", "of", "(", "primitives", "wrap", "(", "type", ")", ")", ";", "}", "return", "this", ";", "}" ]
[ "parses", "the", "hosts", "ports", "for", "communication", "and", "data", "exchange", "from", "configuration" ]
[ "private", "static", "int", "get", "data", "bind", "port", "(", "configuration", "configuration", ")", "{", "final", "int", "data", "bind", "port", ";", "if", "(", "configuration", "contains", "(", "netty", "shuffle", "environment", "options", "data", "bind", "port", ")", ")", "{", "data", "bind", "port", "=", "configuration", "get", "integer", "(", "netty", "shuffle", "environment", "options", "data", "bind", "port", ")", ";", "configuration", "parser", "utils", "check", "config", "parameter", "(", "data", "bind", "port", ">", "=", "0", ",", "data", "bind", "port", ",", "netty", "shuffle", "environment", "options", "data", "bind", "port", "key", "(", ")", ",", "\"", "leave", "config", "parameter", "empty", "to", "fallback", "to", "'", "\"", "+", "netty", "shuffle", "environment", "options", "data", "port", "key", "(", ")", "+", "\"", "'", "automatically", "\"", ")", ";", "}", "else", "{", "data", "bind", "port", "=", "configuration", "get", "integer", "(", "netty", "shuffle", "environment", "options", "data", "port", ")", ";", "configuration", "parser", "utils", "check", "config", "parameter", "(", "data", "bind", "port", ">", "=", "0", ",", "data", "bind", "port", ",", "netty", "shuffle", "environment", "options", "data", "port", "key", "(", ")", ",", "\"", "leave", "config", "parameter", "empty", "or", "use", "0", "to", "let", "the", "system", "choose", "a", "port", "automatically", "\"", ")", ";", "}", "return", "data", "bind", "port", ";", "}" ]
[ "adds", "an", "instance", "field" ]
[ "public", "void", "add", "instance", "field", "(", "encoded", "field", "field", ")", "{", "if", "(", "field", "=", "=", "null", ")", "{", "throw", "new", "null", "pointer", "exception", "(", "\"", "field", "=", "=", "null", "\"", ")", ";", "}", "instance", "fields", "add", "(", "field", ")", ";", "}" ]
[ "gets", "the", "operation" ]
[ "operation", "get", "operation", "(", ")", "{", "return", "operation", ";", "}" ]
[ "this", "method", "will", "be", "invoked", "after", "any", "bean", "properties", "have", "been", "set", "and", "the", "web", "application", "context", "has", "been", "loaded", "the", "default", "implementation", "is", "empty", ";", "subclasses", "may", "override", "this", "method", "to", "perform", "any", "initialization", "they", "require" ]
[ "protected", "void", "init", "framework", "servlet", "(", ")", "throws", "servlet", "exception", "{", "}" ]
[ "set", "spill", "offsets", "for", "given", "partition" ]
[ "public", "void", "put", "index", "(", "index", "record", "rec", ",", "int", "partition", ")", "{", "final", "int", "pos", "=", "partition", "*", "map", "task", "map", "output", "index", "record", "length", "/", "8", ";", "entries", "put", "(", "pos", ",", "rec", "start", "offset", ")", ";", "entries", "put", "(", "pos", "+", "1", ",", "rec", "raw", "length", ")", ";", "entries", "put", "(", "pos", "+", "2", ",", "rec", "part", "length", ")", ";", "}" ]
[ "called", "when", "the", "audio", "capabilities", "change" ]
[ "void", "on", "audio", "capabilities", "changed", "(", "audio", "capabilities", "audio", "capabilities", ")", ";" ]
[ "keep", "trying", "forever", "with", "a", "fixed", "time", "between", "attempts" ]
[ "public", "static", "final", "retry", "policy", "retry", "forever", "with", "fixed", "sleep", "(", "long", "sleep", "time", ",", "time", "unit", "time", "unit", ")", "{", "return", "new", "retry", "up", "to", "maximum", "count", "with", "fixed", "sleep", "(", "integer", "max", "value", ",", "sleep", "time", ",", "time", "unit", ")", ";", "}" ]
[ "customize", "request", "specification" ]
[ "public", "find", "pets", "by", "tags", "oper", "req", "spec", "(", "consumer", "<", "request", "spec", "builder", ">", "req", "spec", "customizer", ")", "{", "req", "spec", "customizer", "accept", "(", "req", "spec", ")", ";", "return", "this", ";", "}" ]
[ "{", "@", "inherit", "doc", "}", "<", "b", ">", "note", ":", "<", "b", ">", "this", "compares", "the", "method", "constants", "only", ",", "ignoring", "any", "associated", "code", ",", "because", "it", "should", "never", "be", "the", "case", "that", "two", "different", "items", "with", "the", "same", "method", "constant", "ever", "appear", "in", "the", "same", "list", "(", "or", "same", "file", ",", "even", ")" ]
[ "public", "int", "compare", "to", "(", "encoded", "field", "other", ")", "{", "return", "field", "compare", "to", "(", "other", "field", ")", ";", "}" ]
[ "converts", "flink", "sql", "{", "@", "link", "logical", "type", "}", "(", "can", "be", "nested", ")", "into", "an", "avro", "schema", "the", "\"", "{", "row", "name", "}", "\"", "is", "used", "as", "the", "nested", "row", "type", "name", "prefix", "in", "order", "to", "generate", "the", "right", "schema", "nested", "record", "type", "that", "only", "differs", "with", "type", "name", "is", "still", "compatible" ]
[ "public", "static", "schema", "convert", "to", "schema", "(", "logical", "type", "logical", "type", ",", "string", "row", "name", ")", "{", "int", "precision", ";", "boolean", "nullable", "=", "logical", "type", "is", "nullable", "(", ")", ";", "switch", "(", "logical", "type", "get", "type", "root", "(", ")", ")", "{", "case", "null", ":", "return", "schema", "builder", "builder", "(", ")", "null", "type", "(", ")", ";", "case", "boolean", ":", "schema", "bool", "=", "schema", "builder", "builder", "(", ")", "boolean", "type", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "bool", ")", ":", "bool", ";", "case", "tinyint", ":", "case", "smallint", ":", "case", "integer", ":", "schema", "integer", "=", "schema", "builder", "builder", "(", ")", "int", "type", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "integer", ")", ":", "integer", ";", "case", "bigint", ":", "schema", "bigint", "=", "schema", "builder", "builder", "(", ")", "long", "type", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "bigint", ")", ":", "bigint", ";", "case", "float", ":", "schema", "f", "=", "schema", "builder", "builder", "(", ")", "float", "type", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "f", ")", ":", "f", ";", "case", "double", ":", "schema", "d", "=", "schema", "builder", "builder", "(", ")", "double", "type", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "d", ")", ":", "d", ";", "case", "char", ":", "case", "varchar", ":", "schema", "str", "=", "schema", "builder", "builder", "(", ")", "string", "type", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "str", ")", ":", "str", ";", "case", "binary", ":", "case", "varbinary", ":", "schema", "binary", "=", "schema", "builder", "builder", "(", ")", "bytes", "type", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "binary", ")", ":", "binary", ";", "case", "timestamp", "without", "time", "zone", ":", "/", "/", "use", "long", "to", "represents", "timestamp", "final", "timestamp", "type", "timestamp", "type", "=", "(", "timestamp", "type", ")", "logical", "type", ";", "precision", "=", "timestamp", "type", "get", "precision", "(", ")", ";", "org", "apache", "avro", "logical", "type", "avro", "logical", "type", ";", "if", "(", "precision", "<", "=", "3", ")", "{", "avro", "logical", "type", "=", "logical", "types", "timestamp", "millis", "(", ")", ";", "}", "else", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "avro", "does", "not", "support", "timestamp", "type", "\"", "+", "\"", "with", "precision", ":", "\"", "+", "precision", "+", "\"", ",", "it", "only", "supports", "precision", "less", "than", "3", "\"", ")", ";", "}", "schema", "timestamp", "=", "avro", "logical", "type", "add", "to", "schema", "(", "schema", "builder", "builder", "(", ")", "long", "type", "(", ")", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "timestamp", ")", ":", "timestamp", ";", "case", "date", ":", "/", "/", "use", "int", "to", "represents", "date", "schema", "date", "=", "logical", "types", "date", "(", ")", "add", "to", "schema", "(", "schema", "builder", "builder", "(", ")", "int", "type", "(", ")", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "date", ")", ":", "date", ";", "case", "time", "without", "time", "zone", ":", "precision", "=", "(", "(", "time", "type", ")", "logical", "type", ")", "get", "precision", "(", ")", ";", "if", "(", "precision", ">", "3", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "avro", "does", "not", "support", "time", "type", "with", "precision", ":", "\"", "+", "precision", "+", "\"", ",", "it", "only", "supports", "precision", "less", "than", "3", "\"", ")", ";", "}", "/", "/", "use", "int", "to", "represents", "time", ",", "we", "only", "support", "millisecond", "when", "deserialization", "schema", "time", "=", "logical", "types", "time", "millis", "(", ")", "add", "to", "schema", "(", "schema", "builder", "builder", "(", ")", "int", "type", "(", ")", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "time", ")", ":", "time", ";", "case", "decimal", ":", "decimal", "type", "decimal", "type", "=", "(", "decimal", "type", ")", "logical", "type", ";", "/", "/", "store", "big", "decimal", "as", "byte", "[", "]", "schema", "decimal", "=", "logical", "types", "decimal", "(", "decimal", "type", "get", "precision", "(", ")", ",", "decimal", "type", "get", "scale", "(", ")", ")", "add", "to", "schema", "(", "schema", "builder", "builder", "(", ")", "bytes", "type", "(", ")", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "decimal", ")", ":", "decimal", ";", "case", "row", ":", "row", "type", "row", "type", "=", "(", "row", "type", ")", "logical", "type", ";", "list", "<", "string", ">", "field", "names", "=", "row", "type", "get", "field", "names", "(", ")", ";", "/", "/", "we", "have", "to", "make", "sure", "the", "record", "name", "is", "different", "in", "a", "schema", "schema", "builder", "field", "assembler", "<", "schema", ">", "builder", "=", "schema", "builder", "builder", "(", ")", "record", "(", "row", "name", ")", "fields", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "row", "type", "get", "field", "count", "(", ")", ";", "i", "+", "+", ")", "{", "string", "field", "name", "=", "field", "names", "get", "(", "i", ")", ";", "logical", "type", "field", "type", "=", "row", "type", "get", "type", "at", "(", "i", ")", ";", "schema", "builder", "generic", "default", "<", "schema", ">", "field", "builder", "=", "builder", "name", "(", "field", "name", ")", "type", "(", "convert", "to", "schema", "(", "field", "type", ",", "row", "name", "+", "\"", "\"", "+", "field", "name", ")", ")", ";", "if", "(", "field", "type", "is", "nullable", "(", ")", ")", "{", "builder", "=", "field", "builder", "with", "default", "(", "null", ")", ";", "}", "else", "{", "builder", "=", "field", "builder", "no", "default", "(", ")", ";", "}", "}", "schema", "record", "=", "builder", "end", "record", "(", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "record", ")", ":", "record", ";", "case", "multiset", ":", "case", "map", ":", "schema", "map", "=", "schema", "builder", "builder", "(", ")", "map", "(", ")", "values", "(", "convert", "to", "schema", "(", "extract", "value", "type", "to", "avro", "map", "(", "logical", "type", ")", ",", "row", "name", ")", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "map", ")", ":", "map", ";", "case", "array", ":", "array", "type", "array", "type", "=", "(", "array", "type", ")", "logical", "type", ";", "schema", "array", "=", "schema", "builder", "builder", "(", ")", "array", "(", ")", "items", "(", "convert", "to", "schema", "(", "array", "type", "get", "element", "type", "(", ")", ",", "row", "name", ")", ")", ";", "return", "nullable", "?", "nullable", "schema", "(", "array", ")", ":", "array", ";", "case", "raw", ":", "case", "timestamp", "with", "local", "time", "zone", ":", "default", ":", "throw", "new", "unsupported", "operation", "exception", "(", "\"", "unsupported", "to", "derive", "schema", "for", "type", ":", "\"", "+", "logical", "type", ")", ";", "}", "}" ]
[ "for", "each", "tuple", "emitted", ",", "return", "a", "value", "(", "typically", "one", "of", "the", "values", "in", "the", "tuple", ")", "modifying", "the", "writables", "in", "the", "tuple", "is", "permitted", "and", "unlikely", "to", "affect", "join", "behavior", "in", "most", "cases", ",", "but", "it", "is", "not", "recommended", "it", "'", "s", "safer", "to", "clone", "first" ]
[ "protected", "abstract", "v", "emit", "(", "tuple", "writable", "dst", ")", "throws", "i", "o", "exception", ";" ]
[ "returns", "the", "number", "of", "instructions", "that", "has", "been", "visited", "so", "far" ]
[ "public", "int", "get", "count", "(", ")", "{", "return", "count", ";", "}" ]
[ "if", "set", ",", "this", "node", "is", "a", "chunk", "of", "text", "<", "code", ">", "optional", "string", "text", "=", "2", ";", "<", "code", ">" ]
[ "public", "boolean", "has", "text", "(", ")", "{", "return", "(", "(", "bit", "field", "0", "&", "0x", "0", "0", "0", "0", "0", "0", "0", "2", ")", "=", "=", "0x", "0", "0", "0", "0", "0", "0", "0", "2", ")", ";", "}" ]
[ "returns", "the", "upper", "4", "bits", "of", "the", "offset" ]
[ "public", "int", "get", "type", "(", "int", "index", ")", "{", "return", "type", "offset", "list", "get", "(", "index", ")", "type", ";", "}" ]
[ "resolve", "the", "types", "of", "the", "specified", "values" ]
[ "public", "static", "class", "[", "]", "resolve", "types", "(", "object", "values", ")", "{", "if", "(", "is", "empty", "(", "values", ")", ")", "{", "return", "empty", "class", "array", ";", "}", "int", "size", "=", "values", "length", ";", "class", "[", "]", "types", "=", "new", "class", "[", "size", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "+", "+", ")", "{", "object", "value", "=", "values", "[", "i", "]", ";", "types", "[", "i", "]", "=", "value", "=", "=", "null", "?", "null", ":", "value", "get", "class", "(", ")", ";", "}", "return", "types", ";", "}" ]
[ "creates", "a", "{", "@", "link", "gif", "image", "}", "from", "a", "byte", "buffer", "containing", "the", "image", "this", "will", "throw", "if", "it", "fails", "to", "create" ]
[ "public", "static", "gif", "image", "create", "from", "byte", "buffer", "(", "byte", "buffer", "byte", "buffer", ",", "image", "decode", "options", "options", ")", "{", "ensure", "(", ")", ";", "byte", "buffer", "rewind", "(", ")", ";", "return", "native", "create", "from", "direct", "byte", "buffer", "(", "byte", "buffer", ",", "options", "max", "dimension", "px", ",", "options", "force", "static", "image", ")", ";", "}" ]
[ "test", "json", "serialization", "of", "form", "data" ]
[ "public", "single", "<", "void", ">", "rx", "test", "json", "form", "data", "(", "string", "param", ",", "string", "param", "2", ")", "{", "return", "single", "create", "(", "new", "io", "vertx", "rx", "java", "single", "on", "subscribe", "adapter", "<", ">", "(", "fut", "-", ">", "delegate", "test", "json", "form", "data", "(", "param", ",", "param", "2", ",", "fut", ")", ")", ")", ";", "}" ]
[ "visits", "a", "zero", "operand", "instruction" ]
[ "public", "void", "visit", "insn", "(", "final", "int", "opcode", ")", "{", "if", "(", "mv", "!", "=", "null", ")", "{", "mv", "visit", "insn", "(", "opcode", ")", ";", "}", "}" ]
[ "add", "set", "quota", "by", "storage", "type", "record", "to", "edit", "log" ]
[ "void", "log", "set", "quota", "by", "storage", "type", "(", "string", "src", ",", "long", "ds", "quota", ",", "storage", "type", "type", ")", "{", "set", "quota", "by", "storage", "type", "op", "op", "=", "set", "quota", "by", "storage", "type", "op", "get", "instance", "(", "cache", "get", "(", ")", ")", "set", "source", "(", "src", ")", "set", "quota", "by", "storage", "type", "(", "ds", "quota", ",", "type", ")", ";", "log", "edit", "(", "op", ")", ";", "}" ]
[ "specify", "a", "database", "schema", "to", "be", "applied", "to", "each", "connection" ]
[ "public", "void", "set", "schema", "(", "@", "nullable", "string", "schema", ")", "{", "this", "schema", "=", "schema", ";", "}" ]
[ "returns", "{", "@", "code", "true", "}", "if", "the", "arguments", "are", "equal", "to", "each", "other", "and", "{", "@", "code", "false", "}", "otherwise", "consequently", ",", "if", "both", "arguments", "are", "{", "@", "code", "null", "}", ",", "{", "@", "code", "true", "}", "is", "returned", "and", "if", "exactly", "one", "argument", "is", "{", "@", "code", "null", "}", ",", "{", "@", "code", "false", "}", "is", "returned", "otherwise", ",", "equality", "is", "determined", "by", "using", "the", "{", "@", "link", "object", "#", "equals", "equals", "}", "method", "of", "the", "first", "argument" ]
[ "public", "static", "boolean", "equals", "(", "object", "a", ",", "object", "b", ")", "{", "return", "(", "a", "=", "=", "b", ")", "|", "|", "(", "a", "!", "=", "null", "&", "&", "a", "equals", "(", "b", ")", ")", ";", "}" ]
[ "called", "to", "draw", "the", "background", ",", "before", "clipping", "is", "applied", "(", "if", "enabled", ")", "default", "implementation", "draws", "the", "background", "drawable" ]
[ "protected", "void", "draw", "background", "(", "batch", "batch", ",", "float", "parent", "alpha", ",", "float", "x", ",", "float", "y", ")", "{", "if", "(", "background", "=", "=", "null", ")", "return", ";", "color", "color", "=", "get", "color", "(", ")", ";", "batch", "set", "color", "(", "color", "r", ",", "color", "g", ",", "color", "b", ",", "color", "a", "*", "parent", "alpha", ")", ";", "background", "draw", "(", "batch", ",", "x", ",", "y", ",", "get", "width", "(", ")", ",", "get", "height", "(", ")", ")", ";", "}" ]
[ "should", "contain", "all", "errors", "thrown" ]
[ "public", "void", "errors", "(", ")", "{", "final", "var", "e", "=", "new", "business", "exception", "(", "\"", "unhandled", "\"", ")", ";", "final", "var", "retry", "=", "new", "retry", "<", "string", ">", "(", "(", ")", "-", ">", "{", "throw", "e", ";", "}", ",", "2", ",", "0", ")", ";", "try", "{", "retry", "perform", "(", ")", ";", "}", "catch", "(", "business", "exception", "ex", ")", "{", "/", "/", "ignore", "}", "assert", "that", "(", "retry", "errors", "(", ")", ",", "has", "item", "(", "e", ")", ")", ";", "}" ]
[ "set", "the", "program" ]
[ "public", "void", "set", "program", "(", "program", "d", "b", "program", ")", "{", "this", "program", "=", "program", ";", "try", "{", "populate", "tree", "map", "(", "false", ")", ";", "if", "(", "open", "mode", "=", "=", "d", "b", "constants", "create", ")", "{", "create", "default", "tree", "(", ")", ";", "open", "mode", "=", "-", "1", ";", "/", "/", "clear", "open", "mode", "flag", "}", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "program", "db", "error", "(", "e", ")", ";", "}", "}" ]
[ "returns", "the", "offset" ]
[ "public", "long", "get", "offset", "(", ")", "{", "return", "offset", ";", "}" ]
[ "get", "the", "file", "'", "s", "block", "locations", "in", "hdfs", ",", "the", "returned", "block", "location", "will", "have", "different", "formats", "for", "replicated", "and", "erasure", "coded", "file", "please", "refer", "to", "{", "@", "link", "file", "system", "#", "get", "file", "block", "locations", "(", "file", "status", ",", "long", ",", "long", ")", "}", "for", "more", "details" ]
[ "public", "block", "location", "[", "]", "get", "block", "locations", "(", ")", "{", "return", "locations", ";", "}" ]
[ "calculates", "a", "scissor", "rectangle", "using", "0", ",", "0", ",", "gdx", "graphics", "get", "width", "(", ")", ",", "gdx", "graphics", "get", "height", "(", ")", "as", "the", "viewport" ]
[ "public", "static", "void", "calculate", "scissors", "(", "camera", "camera", ",", "matrix", "4", "batch", "transform", ",", "rectangle", "area", ",", "rectangle", "scissor", ")", "{", "calculate", "scissors", "(", "camera", ",", "0", ",", "0", ",", "gdx", "graphics", "get", "width", "(", ")", ",", "gdx", "graphics", "get", "height", "(", ")", ",", "batch", "transform", ",", "area", ",", "scissor", ")", ";", "}" ]
[ "get", "metrics", "from", "the", "metrics", "source" ]
[ "public", "void", "get", "metrics", "(", "metrics", "collector", "collector", ",", "boolean", "all", ")", "{", "try", "{", "data", "node", "metric", "helper", "get", "metrics", "(", "collector", ",", "this", ",", "\"", "external", "dataset", "\"", ")", ";", "}", "catch", "(", "exception", "e", ")", "{", "/", "/", "ignore", "exceptions", "}", "}" ]
[ "sets", "the", "target", "version", "on", "classes", "in", "the", "given", "program", "class", "pool" ]
[ "public", "void", "execute", "(", "class", "pool", "program", "class", "pool", ")", "throws", "i", "o", "exception", "{", "set", "newer", "class", "versions", "=", "configuration", "warn", "!", "=", "null", "?", "null", ":", "new", "hash", "set", "(", ")", ";", "program", "class", "pool", "classes", "accept", "(", "new", "class", "version", "setter", "(", "configuration", "target", "class", "version", ",", "newer", "class", "versions", ")", ")", ";", "if", "(", "newer", "class", "versions", "!", "=", "null", "&", "&", "newer", "class", "versions", "size", "(", ")", ">", "0", ")", "{", "system", "err", "print", "(", "\"", "warning", ":", "some", "classes", "have", "more", "recent", "versions", "(", "\"", ")", ";", "iterator", "iterator", "=", "newer", "class", "versions", "iterator", "(", ")", ";", "while", "(", "iterator", "has", "next", "(", ")", ")", "{", "integer", "class", "version", "=", "(", "integer", ")", "iterator", "next", "(", ")", ";", "system", "err", "print", "(", "class", "util", "external", "class", "version", "(", "class", "version", "int", "value", "(", ")", ")", ")", ";", "if", "(", "iterator", "has", "next", "(", ")", ")", "{", "system", "err", "print", "(", "\"", ",", "\"", ")", ";", "}", "}", "system", "err", "println", "(", "\"", ")", "\"", ")", ";", "system", "err", "println", "(", "\"", "than", "the", "target", "version", "(", "\"", "+", "class", "util", "external", "class", "version", "(", "configuration", "target", "class", "version", ")", "+", "\"", ")", "\"", ")", ";", "if", "(", "!", "configuration", "ignore", "warnings", ")", "{", "system", "err", "println", "(", "\"", "if", "you", "are", "sure", "this", "is", "not", "a", "problem", ",", "\"", ")", ";", "system", "err", "println", "(", "\"", "you", "could", "try", "your", "luck", "using", "the", "'", "-", "ignorewarnings", "'", "option", "\"", ")", ";", "throw", "new", "i", "o", "exception", "(", "\"", "please", "correct", "the", "above", "warnings", "first", "\"", ")", ";", "}", "}", "}" ]
[ "determines", "that", "there", "are", "functions", "at", "the", "indicated", "source", "and", "destination", ",", "but", "no", "match", "was", "created" ]
[ "protected", "void", "verify", "no", "function", "match", "(", "string", "source", "address", "string", ",", "string", "destination", "address", "string", ")", "{", "source", "address", "=", "addr", "(", "source", "address", "string", ",", "source", "program", ")", ";", "destination", "address", "=", "addr", "(", "destination", "address", "string", ",", "destination", "program", ")", ";", "source", "function", "=", "source", "program", "get", "function", "manager", "(", ")", "get", "function", "at", "(", "source", "address", ")", ";", "assert", "not", "null", "(", "source", "function", ")", ";", "destination", "function", "=", "destination", "program", "get", "function", "manager", "(", ")", "get", "function", "at", "(", "destination", "address", ")", ";", "assert", "not", "null", "(", "destination", "function", ")", ";", "test", "match", "=", "get", "match", "(", "source", "address", ",", "destination", "address", ")", ";", "assert", "null", "(", "test", "match", ")", ";", "}" ]
[ "returns", "a", "scheduler", "that", "always", "returns", "a", "successfully", "completed", "future" ]
[ "static", "@", "non", "null", "scheduler", "disabled", "scheduler", "(", ")", "{", "return", "disabled", "scheduler", "instance", ";", "}" ]
[ "returns", "the", "stderr", "as", "a", "byte", "array" ]
[ "public", "byte", "[", "]", "get", "stderr", "(", ")", "{", "return", "get", "stderr", "stream", "(", ")", "to", "byte", "array", "(", ")", ";", "}" ]
[ "returns", "whether", "to", "process", "proguarded", "android", "binaries", "with", "incremental", "dexing", "tools" ]
[ "public", "int", "incremental", "dexing", "shards", "after", "proguard", "(", ")", "{", "return", "incremental", "dexing", "shards", "after", "proguard", ";", "}" ]
[ "generate", "(", "possibly", "multiple", ")", "hashes", "that", "can", "be", "used", "to", "disambiguate", "an", "n", "-", "gram", "and", "its", "block", "from", "other", "blocks", "with", "similar", "instructions", "hashes", "are", "attached", "to", "the", "block", "'", "s", "disambig", "hash", "list" ]
[ "public", "array", "list", "<", "hash", ">", "calc", "hashes", "(", "instruct", "hash", "inst", "hash", ",", "int", "match", "size", ",", "hash", "store", "store", ")", "throws", "cancelled", "exception", ",", "memory", "access", "exception", ";" ]
[ "put", "entries", ",", "using", "the", "time", "provider", "to", "set", "their", "timestamp" ]
[ "public", "static", "void", "put", "with", "ttl", "(", "metadata", "store", "ms", ",", "collection", "<", "?", "extends", "path", "metadata", ">", "file", "metas", ",", "@", "nullable", "i", "ttl", "time", "provider", "time", "provider", ",", "@", "nullable", "final", "bulk", "operation", "state", "operation", "state", ")", "throws", "i", "o", "exception", "{", "patch", "last", "updated", "(", "file", "metas", ",", "time", "provider", ")", ";", "ms", "put", "(", "file", "metas", ",", "operation", "state", ")", ";", "}" ]
[ "return", "the", "example", "value", "of", "the", "parameter" ]
[ "public", "void", "set", "parameter", "example", "value", "(", "codegen", "parameter", "codegen", "parameter", ",", "request", "body", "request", "body", ")", "{", "content", "content", "=", "request", "body", "get", "content", "(", ")", ";", "if", "(", "content", "size", "(", ")", ">", "1", ")", "{", "/", "/", "@", "see", "model", "utils", "get", "schema", "from", "content", "(", ")", "once", "(", "logger", ")", "warn", "(", "\"", "multiple", "media", "types", "found", ",", "using", "only", "the", "first", "one", "\"", ")", ";", "}", "media", "type", "media", "type", "=", "content", "values", "(", ")", "iterator", "(", ")", "next", "(", ")", ";", "if", "(", "media", "type", "get", "example", "(", ")", "!", "=", "null", ")", "{", "codegen", "parameter", "example", "=", "media", "type", "get", "example", "(", ")", "to", "string", "(", ")", ";", "return", ";", "}", "if", "(", "media", "type", "get", "examples", "(", ")", "!", "=", "null", "&", "&", "!", "media", "type", "get", "examples", "(", ")", "is", "empty", "(", ")", ")", "{", "example", "example", "=", "media", "type", "get", "examples", "(", ")", "values", "(", ")", "iterator", "(", ")", "next", "(", ")", ";", "if", "(", "example", "get", "value", "(", ")", "!", "=", "null", ")", "{", "codegen", "parameter", "example", "=", "example", "get", "value", "(", ")", "to", "string", "(", ")", ";", "return", ";", "}", "}", "set", "parameter", "example", "value", "(", "codegen", "parameter", ")", ";", "}" ]
[ "translates", "a", "rollup", "-", "only", "search", "response", "back", "into", "the", "expected", "convention", "similar", "to", "{", "@", "link", "#", "combine", "responses", "(", "multi", "search", "response", "item", "[", "]", ",", "internal", "aggregation", "reduce", "context", ")", "}", "except", "it", "only", "has", "to", "deal", "with", "the", "rollup", "response", "(", "no", "live", "response", ")", "see", "{", "@", "link", "#", "combine", "responses", "(", "multi", "search", "response", "item", "[", "]", ",", "internal", "aggregation", "reduce", "context", ")", "}", "for", "more", "details", "on", "the", "translation", "conventions" ]
[ "public", "static", "search", "response", "translate", "response", "(", "multi", "search", "response", "item", "[", "]", "rolled", "msearch", ",", "internal", "aggregation", "reduce", "context", "reduce", "context", ")", "throws", "exception", "{", "assert", "rolled", "msearch", "length", ">", "0", ";", "list", "<", "search", "response", ">", "responses", "=", "new", "array", "list", "<", ">", "(", ")", ";", "for", "(", "multi", "search", "response", "item", "item", ":", "rolled", "msearch", ")", "{", "if", "(", "item", "is", "failure", "(", ")", ")", "{", "exception", "e", "=", "item", "get", "failure", "(", ")", ";", "/", "/", "if", "an", "index", "was", "deleted", "after", "execution", ",", "give", "a", "hint", "to", "the", "user", "that", "this", "is", "a", "transient", "error", "if", "(", "e", "instanceof", "index", "not", "found", "exception", ")", "{", "throw", "new", "resource", "not", "found", "exception", "(", "\"", "index", "[", "\"", "+", "(", "(", "index", "not", "found", "exception", ")", "e", ")", "get", "index", "(", ")", "get", "name", "(", ")", "+", "\"", "]", "was", "not", "found", ",", "likely", "because", "it", "was", "deleted", "while", "the", "request", "was", "in", "-", "flight", "\"", "+", "\"", "rollup", "does", "not", "support", "partial", "search", "results", ",", "please", "try", "the", "request", "again", "\"", ")", ";", "}", "/", "/", "otherwise", "just", "throw", "throw", "e", ";", "}", "/", "/", "no", "error", ",", "add", "to", "responses", "responses", "add", "(", "item", "get", "response", "(", ")", ")", ";", "}", "assert", "responses", "size", "(", ")", ">", "0", ";", "return", "do", "combine", "response", "(", "null", ",", "responses", ",", "reduce", "context", ")", ";", "}" ]
[ "returns", "the", "number", "of", "bytes", "that", "have", "been", "read", "since", "the", "most", "recent", "call", "to", "{", "@", "link", "#", "open", "(", "data", "spec", ")", "}" ]
[ "protected", "final", "long", "bytes", "read", "(", ")", "{", "return", "bytes", "read", ";", "}" ]
[ "registers", "an", "{", "@", "link", "aggregate", "function", "}", "under", "a", "unique", "name", "in", "the", "table", "environment", "'", "s", "catalog", "registered", "functions", "can", "be", "referenced", "in", "table", "api", "and", "sql", "queries" ]
[ "<", "t", ",", "acc", ">", "void", "register", "function", "(", "string", "name", ",", "aggregate", "function", "<", "t", ",", "acc", ">", "aggregate", "function", ")", ";" ]
[ "sort", "the", "attributes", "by", "their", "id" ]
[ "public", "final", "void", "sort", "(", ")", "{", "if", "(", "!", "sorted", ")", "{", "attributes", "sort", "(", "this", ")", ";", "sorted", "=", "true", ";", "}", "}" ]
[ "indicates", "whether", "the", "query", "should", "be", "rewritten", "into", "primitive", "queries" ]
[ "public", "boolean", "rewrite", "(", ")", "{", "return", "rewrite", ";", "}" ]
[ "get", "a", "correctly", "typed", "state", "store", ",", "given", "a", "handle", "on", "the", "original", "builder" ]
[ "default", "<", "t", "extends", "state", "store", ">", "t", "get", "state", "store", "(", "final", "store", "builder", "<", "t", ">", "builder", ")", "{", "return", "(", "t", ")", "get", "state", "store", "(", "builder", "name", "(", ")", ")", ";", "}" ]
[ "returns", "a", "reference", "to", "the", "given", "nodes", "instances", "of", "the", "given", "class", "&", "gt", ";", "t", "&", "lt", ";" ]
[ "public", "<", "t", ">", "t", "get", "instance", "(", "class", "<", "t", ">", "clazz", ",", "final", "string", "node", ")", "{", "return", "get", "instance", "(", "clazz", ",", "nc", "-", ">", "node", "=", "=", "null", "|", "|", "node", "equals", "(", "nc", "name", ")", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "java", "lang", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "static", "helper", "method", "to", "easily", "display", "an", "single", "-", "option", "dialog", "the", "dialog", "will", "remain", "until", "the", "user", "presses", "the", "option", "1", "button", "or", "the", "cancel", "button" ]
[ "public", "static", "int", "show", "option", "dialog", "(", "component", "parent", ",", "string", "title", ",", "string", "message", ",", "string", "option", "1", ")", "{", "return", "show", "option", "dialog", "(", "parent", ",", "title", ",", "message", ",", "option", "1", ",", "plain", "message", ")", ";", "}" ]
[ "peek", ",", "like", "poll", ",", "provides", "no", "strict", "consistency" ]
[ "public", "e", "peek", "(", ")", "{", "e", "e", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "e", "=", "=", "null", "&", "&", "i", "<", "queues", "size", "(", ")", ";", "i", "+", "+", ")", "{", "e", "=", "queues", "get", "(", "i", ")", "peek", "(", ")", ";", "}", "return", "e", ";", "}" ]
[ "syntactic", "sugar", "for", "creating", "a", "schema", "field" ]
[ "protected", "final", "field", "attribute", "field", "(", "string", "name", ",", "data", "type", "type", ")", "{", "return", "field", "(", "name", ",", "new", "es", "field", "(", "name", ",", "type", ",", "empty", "map", "(", ")", ",", "true", ")", ")", ";", "}" ]