docstring_tokens
list
code_tokens
list
[ "check", "if", "the", "string", "supplied", "is", "empty", "a", "string", "is", "empty", "when", "it", "is", "null", "or", "when", "the", "length", "is", "0" ]
[ "return", "utils", "is", "empty", "(", "val", ")", ";" ]
[ "check", "if", "the", "string", "buffer", "supplied", "is", "empty", "a", "string", "buffer", "is", "empty", "when", "it", "is", "null", "or", "when", "the", "length", "is", "0" ]
[ "return", "utils", "is", "empty", "(", "val", ")", ";" ]
[ "check", "if", "the", "string", "array", "supplied", "is", "empty", "a", "string", "array", "is", "empty", "when", "it", "is", "null", "or", "when", "the", "number", "of", "elements", "is", "0" ]
[ "return", "utils", "is", "empty", "(", "vals", ")", ";" ]
[ "check", "if", "the", "char", "sequence", "supplied", "is", "empty", "a", "char", "sequence", "is", "empty", "when", "it", "is", "null", "or", "when", "the", "length", "is", "0" ]
[ "return", "utils", "is", "empty", "(", "val", ")", ";" ]
[ "check", "if", "the", "char", "sequence", "array", "supplied", "is", "empty", "a", "char", "sequence", "array", "is", "empty", "when", "it", "is", "null", "or", "when", "the", "number", "of", "elements", "is", "0" ]
[ "return", "utils", "is", "empty", "(", "vals", ")", ";" ]
[ "check", "if", "the", "array", "supplied", "is", "empty", "an", "array", "is", "empty", "when", "it", "is", "null", "or", "when", "the", "length", "is", "0" ]
[ "return", "utils", "is", "empty", "(", "array", ")", ";" ]
[ "check", "if", "the", "list", "supplied", "is", "empty", "an", "array", "is", "empty", "when", "it", "is", "null", "or", "when", "the", "length", "is", "0" ]
[ "return", "utils", "is", "empty", "(", "list", ")", ";" ]
[ "utility", "class", "for", "use", "in", "java", "script", "to", "create", "a", "new", "byte", "array", "this", "is", "surprisingly", "difficult", "to", "do", "in", "java", "script" ]
[ "return", "new", "byte", "[", "size", "]", ";" ]
[ "create", "a", "valid", "filename", "using", "a", "name", "we", "remove", "all", "special", "characters", "spaces", "etc" ]
[ "string", "builder", "filename", "=", "new", "string", "builder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "name", "length", "(", ")", ";", "i", "+", "+", ")", "{", "char", "c", "=", "name", "char", "at", "(", "i", ")", ";", "if", "(", "character", "is", "unicode", "identifier", "part", "(", "c", ")", ")", "{", "filename", "append", "(", "c", ")", ";", "}", "else", "if", "(", "character", "is", "whitespace", "(", "c", ")", ")", "{", "filename", "append", "(", "'", "'", ")", ";", "}", "}", "return", "filename", "to", "string", "(", ")", "to", "lower", "case", "(", ")", ";" ]
[ "return", "the", "current", "time", "as", "nano", "-", "seconds" ]
[ "return", "new", "date", "(", ")", "get", "time", "(", ")", "*", "1000", ";" ]
[ "return", "the", "input", "string", "trimmed", "as", "specified" ]
[ "switch", "(", "trim", "type", ")", "{", "case", "value", "meta", "interface", "trim", "type", "both", ":", "return", "trim", "(", "string", ")", ";", "case", "value", "meta", "interface", "trim", "type", "left", ":", "return", "ltrim", "(", "string", ")", ";", "case", "value", "meta", "interface", "trim", "type", "right", ":", "return", "rtrim", "(", "string", ")", ";", "case", "value", "meta", "interface", "trim", "type", "none", ":", "default", ":", "return", "string", ";", "}" ]
[ "implemented", "to", "help", "prevent", "errors", "in", "matching", "up", "pluggable", "laf", "directories", "and", "paths", "/", "files", "eliminating", "malformed", "u", "r", "ls", "-", "duplicate", "file", "separators", "or", "missing", "file", "separators" ]
[ "boolean", "dir", "has", "separator", "=", "(", "(", "dir", "last", "index", "of", "(", "file", "separator", ")", ")", "=", "=", "dir", "length", "(", ")", "-", "1", ")", ";", "boolean", "file", "has", "separator", "=", "(", "file", "index", "of", "(", "file", "separator", ")", "=", "=", "0", ")", ";", "if", "(", "(", "dir", "has", "separator", "&", "&", "!", "file", "has", "separator", ")", "|", "|", "(", "!", "dir", "has", "separator", "&", "&", "file", "has", "separator", ")", ")", "{", "return", "dir", "+", "file", ";", "}", "if", "(", "dir", "has", "separator", "&", "&", "file", "has", "separator", ")", "{", "return", "dir", "+", "file", "substring", "(", "1", ")", ";", "}", "return", "dir", "+", "file", "separator", "+", "file", ";" ]
[ "create", "an", "array", "of", "strings", "consisting", "of", "spaces", "the", "index", "of", "a", "string", "in", "the", "array", "determines", "the", "number", "of", "spaces", "in", "that", "string" ]
[ "if", "(", "empty", "padded", "spaces", "strings", "=", "=", "null", ")", "{", "empty", "padded", "spaces", "strings", "=", "new", "string", "[", "250", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "empty", "padded", "spaces", "strings", "length", ";", "i", "+", "+", ")", "{", "empty", "padded", "spaces", "strings", "[", "i", "]", "=", "right", "pad", "(", "\"", "\"", ",", "i", ")", ";", "}", "}", "return", "empty", "padded", "spaces", "strings", ";" ]
[ "return", "the", "percentage", "of", "free", "memory", "for", "this", "jvm" ]
[ "runtime", "runtime", "=", "runtime", "get", "runtime", "(", ")", ";", "long", "max", "memory", "=", "runtime", "max", "memory", "(", ")", ";", "long", "allocated", "memory", "=", "runtime", "total", "memory", "(", ")", ";", "long", "free", "memory", "=", "runtime", "free", "memory", "(", ")", ";", "long", "total", "free", "memory", "=", "(", "free", "memory", "+", "(", "max", "memory", "-", "allocated", "memory", ")", ")", ";", "return", "(", "int", ")", "math", "round", "(", "100", "*", "(", "double", ")", "total", "free", "memory", "/", "max", "memory", ")", ";" ]
[ "return", "non", "digits", "only" ]
[ "if", "(", "utils", "is", "empty", "(", "input", ")", ")", "{", "return", "null", ";", "}", "string", "builder", "digits", "only", "=", "new", "string", "builder", "(", ")", ";", "char", "c", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "input", "length", "(", ")", ";", "i", "+", "+", ")", "{", "c", "=", "input", "char", "at", "(", "i", ")", ";", "if", "(", "!", "character", "is", "digit", "(", "c", ")", ")", "{", "digits", "only", "append", "(", "c", ")", ";", "}", "}", "return", "digits", "only", "to", "string", "(", ")", ";" ]
[ "return", "digits", "only" ]
[ "if", "(", "utils", "is", "empty", "(", "input", ")", ")", "{", "return", "null", ";", "}", "string", "builder", "digits", "only", "=", "new", "string", "builder", "(", ")", ";", "char", "c", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "input", "length", "(", ")", ";", "i", "+", "+", ")", "{", "c", "=", "input", "char", "at", "(", "i", ")", ";", "if", "(", "character", "is", "digit", "(", "c", ")", ")", "{", "digits", "only", "append", "(", "c", ")", ";", "}", "}", "return", "digits", "only", "to", "string", "(", ")", ";" ]
[ "escape", "xml", "content", "i", "e", "replace", "characters", "with", "&", "values", ";" ]
[ "if", "(", "utils", "is", "empty", "(", "content", ")", ")", "{", "return", "content", ";", "}", "return", "string", "escape", "utils", "escape", "xml", "(", "content", ")", ";" ]
[ "escape", "html", "content", "i", "e", "replace", "characters", "with", "&", "values", ";" ]
[ "if", "(", "utils", "is", "empty", "(", "content", ")", ")", "{", "return", "content", ";", "}", "return", "string", "escape", "utils", "escape", "html", "(", "content", ")", ";" ]
[ "un", "escape", "html", "content", "i", "e", "replace", "characters", "with", "&", "values", ";" ]
[ "if", "(", "utils", "is", "empty", "(", "content", ")", ")", "{", "return", "content", ";", "}", "return", "string", "escape", "utils", "unescape", "html", "(", "content", ")", ";" ]
[ "un", "escape", "xml", "content", "i", "e", "replace", "characters", "with", "&", "values", ";" ]
[ "if", "(", "utils", "is", "empty", "(", "content", ")", ")", "{", "return", "content", ";", "}", "return", "string", "escape", "utils", "unescape", "xml", "(", "content", ")", ";" ]
[ "escape", "sql", "content", "i", "e", "replace", "characters", "with", "&", "values", ";" ]
[ "if", "(", "utils", "is", "empty", "(", "content", ")", ")", "{", "return", "content", ";", "}", "return", "string", "escape", "utils", "escape", "sql", "(", "content", ")", ";" ]
[ "remove", "cr", "/", "lf", "from", "string", "-", "better", "performance", "version", "-", "doesn", "t", "npe", "-", "40", "times", "faster", "on", "an", "empty", "string", "-", "2", "times", "faster", "on", "a", "mixed", "string", "-", "25", "%", "faster", "on", "2", "char", "string", "with", "only", "crlf", "in", "it" ]
[ "if", "(", "(", "in", "!", "=", "null", ")", "&", "&", "(", "in", "length", "(", ")", ">", "0", ")", ")", "{", "int", "in", "len", "=", "in", "length", "(", ")", ",", "posn", "=", "0", ";", "char", "[", "]", "tmp", "=", "new", "char", "[", "in", "len", "]", ";", "char", "ch", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "in", "len", ";", "i", "+", "+", ")", "{", "ch", "=", "in", "char", "at", "(", "i", ")", ";", "if", "(", "(", "ch", "!", "=", "'", "\\", "n", "'", "&", "&", "ch", "!", "=", "'", "\\", "r", "'", ")", ")", "{", "tmp", "[", "posn", "]", "=", "ch", ";", "posn", "+", "+", ";", "}", "}", "return", "new", "string", "(", "tmp", ",", "0", ",", "posn", ")", ";", "}", "else", "{", "return", "\"", "\"", ";", "}" ]
[ "remove", "character", "from", "string", "-", "better", "performance", "version", "-", "doesn", "t", "npe", "-", "40", "times", "faster", "on", "an", "empty", "string", "-", "2", "times", "faster", "on", "a", "mixed", "string", "-", "25", "%", "faster", "on", "2", "char", "string", "with", "only", "cr", "/", "lf", "/", "tab", "in", "it" ]
[ "if", "(", "(", "in", "!", "=", "null", ")", "&", "&", "(", "in", "length", "(", ")", ">", "0", ")", ")", "{", "int", "in", "len", "=", "in", "length", "(", ")", ",", "posn", "=", "0", ";", "char", "[", "]", "tmp", "=", "new", "char", "[", "in", "len", "]", ";", "char", "ch", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "in", "len", ";", "i", "+", "+", ")", "{", "ch", "=", "in", "char", "at", "(", "i", ")", ";", "if", "(", "ch", "!", "=", "bad", "char", ")", "{", "tmp", "[", "posn", "]", "=", "ch", ";", "posn", "+", "+", ";", "}", "}", "return", "new", "string", "(", "tmp", ",", "0", ",", "posn", ")", ";", "}", "else", "{", "return", "\"", "\"", ";", "}" ]
[ "remove", "cr", "/", "lf", "from", "string" ]
[ "return", "remove", "char", "(", "in", ",", "'", "\\", "r", "'", ")", ";" ]
[ "remove", "cr", "/", "lf", "from", "string" ]
[ "return", "remove", "char", "(", "in", ",", "'", "\\", "n", "'", ")", ";" ]
[ "remove", "horizontal", "tab", "from", "string" ]
[ "return", "remove", "char", "(", "in", ",", "'", "\\", "t", "'", ")", ";" ]
[ "get", "the", "number", "of", "occurrences", "of", "search", "for", "in", "string" ]
[ "if", "(", "string", "=", "=", "null", "|", "|", "string", "length", "(", ")", "=", "=", "0", ")", "{", "return", "0", ";", "}", "int", "counter", "=", "0", ";", "int", "len", "=", "search", "for", "length", "(", ")", ";", "if", "(", "len", ">", "0", ")", "{", "int", "start", "=", "string", "index", "of", "(", "search", "for", ")", ";", "while", "(", "start", "!", "=", "-", "1", ")", "{", "counter", "+", "+", ";", "start", "=", "string", "index", "of", "(", "search", "for", ",", "start", "+", "len", ")", ";", "}", "}", "return", "counter", ";" ]
[ "get", "the", "number", "of", "occurrences", "of", "search", "for", "in", "string" ]
[ "if", "(", "string", "=", "=", "null", "|", "|", "string", "length", "(", ")", "=", "=", "0", ")", "{", "return", "0", ";", "}", "pattern", "p", "=", "pattern", "compile", "(", "search", "for", ")", ";", "matcher", "m", "=", "p", "matcher", "(", "string", ")", ";", "int", "count", "=", "0", ";", "while", "(", "m", "find", "(", ")", ")", "{", "+", "+", "count", ";", "}", "return", "count", ";" ]
[ "mask", "xml", "content", "i", "e", "replace", "characters", "with", "&", "values", ";" ]
[ "if", "(", "utils", "is", "empty", "(", "content", ")", ")", "{", "return", "content", ";", "}", "return", "string", "escape", "utils", "escape", "xml", "(", "content", ")", ";" ]
[ "this", "implementation", "considers", "to", "node", "info", "objects", "to", "be", "equal", "if", "their", "underlying", "nodes", "are", "equal" ]
[ "if", "(", "this", "=", "=", "other", ")", "{", "return", "true", ";", "}", "if", "(", "other", "instanceof", "element", "node", ")", "{", "return", "this", "get", "underlying", "node", "(", ")", "=", "=", "(", "(", "element", "node", ")", "other", ")", "get", "underlying", "node", "(", ")", ";", "}", "return", "false", ";" ]
[ "this", "implementation", "always", "returns", "0" ]
[ "return", "0", ";" ]
[ "this", "implementation", "delegates", "to", "{", "@", "link", "#", "equals", "(", "object", ")", "}", "per", "the", "saxon", "documentation", "s", "description", "of", "this", "method", "s", "behavior" ]
[ "return", "this", "equals", "(", "other", ")", ";" ]
[ "this", "implementation", "calls", "{", "@", "link", "#", "iterate", "axis", "(", "byte", ")", "}", "to", "get", "an", "{", "@", "link", "axis", "iterator", "}", "which", "is", "then", "optionally", "filtered", "using", "{", "@", "link", "axis", "filter", "}" ]
[ "axis", "iterator", "axis", "iterator", "=", "iterate", "axis", "(", "axis", "number", ")", ";", "if", "(", "node", "test", "!", "=", "null", ")", "{", "axis", "iterator", "=", "new", "axis", "filter", "(", "axis", "iterator", ",", "node", "test", ")", ";", "}", "return", "axis", "iterator", ";" ]
[ "<", "p", ">", "the", "dimension", "name", "<", "/", "p", ">" ]
[ "set", "key", "(", "key", ")", ";", "return", "this", ";" ]
[ "adds", "listener", "for", "state", "changes" ]
[ "state", "listeners", "add", "(", "listener", ")", ";" ]
[ "resets", "to", "initial", "state", "(", "default", "position", "min", "zoom", "level", ")", "and", "notifies", "{" ]
[ "stop", "all", "animations", "(", ")", ";", "boolean", "reset", "=", "state", "controller", "reset", "state", "(", "state", ")", ";", "if", "(", "reset", ")", "{", "notify", "state", "reset", "(", ")", ";", "}", "else", "{", "notify", "state", "updated", "(", ")", ";", "}" ]
[ "sets", "pivot", "point", "for", "zooming", "when", "keeping", "image", "in", "bounds" ]
[ "this", "pivot", "x", "=", "pivot", "x", ";", "this", "pivot", "y", "=", "pivot", "y", ";" ]
[ "animates", "current", "state", "to", "provided", "end", "state" ]
[ "return", "animate", "state", "to", "(", "end", "state", ",", "true", ")", ";" ]
[ "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-" ]
[ "is", "intercept", "touch", "called", "=", "true", ";", "return", "on", "touch", "internal", "(", "view", ",", "event", ")", ";" ]
[ "{" ]
[ "return", "false", ";" ]
[ "{" ]
[ "return", "false", ";" ]
[ "<", "p", ">", "returns", "<", "code", ">", "true", "<", "/", "code", ">", "if", "the", "request", "succeeds", ";", "otherwise", "it", "returns", "an", "error", "<", "/", "p", ">" ]
[ "set", "return", "(", "return", "value", ")", ";", "return", "this", ";" ]
[ "returns", "a", "base", "6", "4", "encoded", "version", "of", "the", "byte", "array" ]
[ "return", "new", "string", "(", "base", "6", "4", "encode", "base", "6", "4", "(", "bytes", ")", ")", ";" ]
[ "{" ]
[ "ignite", "configuration", "cfg", "=", "super", "get", "configuration", "(", "ignite", "instance", "name", ")", ";", "if", "(", "custom", "load", "balancer", ")", "cfg", "set", "load", "balancing", "spi", "(", "new", "custom", "load", "balancer", "spi", "(", ")", ")", ";", "return", "cfg", ";" ]
[ "{" ]
[ "collection", "<", "compute", "job", ">", "jobs", "=", "new", "array", "list", "<", ">", "(", "grid", "size", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "grid", "size", ";", "i", "+", "+", ")", "jobs", "add", "(", "new", "custom", "test", "job", "(", ")", ")", ";", "return", "jobs", ";" ]
[ "{" ]
[ "assert", "results", "!", "=", "null", ";", "string", "res", "=", "\"", "\"", ";", "for", "(", "compute", "job", "result", "job", "res", ":", "results", ")", "res", "+", "=", "job", "res", "get", "data", "(", ")", ";", "return", "res", ";" ]
[ "{" ]
[ "return", "job", "result", ";" ]
[ "a", "recursive", "function", "to", "sort", "response", "tree" ]
[ "if", "(", "node", "children", "size", "(", ")", "=", "=", "0", ")", "return", ";", "for", "(", "summary", "response", "tree", "node", "child", ":", "node", "children", ")", "{", "sort", "child", "nodes", "(", "child", ",", "global", "baseline", "value", ",", "global", "current", "value", ",", "cost", "function", ")", ";", "}", "double", "ratio", "=", "node", "current", "ratio", "(", ")", ";", "for", "(", "summary", "response", "tree", "node", "child", ":", "node", "children", ")", "{", "compute", "cost", "(", "child", ",", "ratio", ",", "global", "baseline", "value", ",", "global", "current", "value", ",", "cost", "function", ")", ";", "}", "collections", "sort", "(", "node", "children", ",", "collections", "reverse", "order", "(", "new", "summary", "response", "tree", "node", "cost", "comparator", "(", ")", ")", ")", ";" ]
[ "returns", "email", "store" ]
[ "return", "session", "get", "store", "(", "protocol", "imap", ")", ";" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "return", "email", "util", "create", "session", "(", "protocol", "imap", ",", "create", "session", "properties", "(", ")", ",", "authenticator", ",", "attachment", "storage", ")", ";" ]
[ "<", "p", ">", "the", "name", "of", "the", "role", "associated", "with", "the", "policy", "<", "/", "p", ">", "<", "p", ">", "this", "parameter", "allows", "(", "per", "its", "<", "a", "href", "=", "http", ":", "/", "/", "wikipedia", "org", "/", "wiki", "/", "regex", ">", "regex", "pattern", "<", "/", "a", ">", ")", "a", "string", "of", "characters", "consisting", "of", "upper", "and", "lowercase", "alphanumeric", "characters", "with", "no", "spaces", "you", "can", "also", "include", "any", "of", "the", "following", "characters", ":", "+", "=", "@", "-", "<", "/", "p", ">" ]
[ "set", "role", "name", "(", "role", "name", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "the", "name", "of", "the", "policy", "document", "to", "get", "<", "/", "p", ">", "<", "p", ">", "this", "parameter", "allows", "(", "per", "its", "<", "a", "href", "=", "http", ":", "/", "/", "wikipedia", "org", "/", "wiki", "/", "regex", ">", "regex", "pattern", "<", "/", "a", ">", ")", "a", "string", "of", "characters", "consisting", "of", "upper", "and", "lowercase", "alphanumeric", "characters", "with", "no", "spaces", "you", "can", "also", "include", "any", "of", "the", "following", "characters", ":", "+", "=", "@", "-", "<", "/", "p", ">" ]
[ "set", "policy", "name", "(", "policy", "name", ")", ";", "return", "this", ";" ]
[ "adapted", "from", "{" ]
[ "return", "string", "=", "=", "null", "|", "|", "string", "is", "empty", "(", ")", "?", "null", ":", "string", ";" ]
[ "returns", "an", "unmodifiable", "collection", "which", "may", "be", "empty", "but", "is", "never", "null" ]
[ "return", "map", "contains", "key", "(", "key", ")", "&", "&", "map", "get", "(", "key", ")", "!", "=", "null", "?", "map", "get", "(", "key", ")", ":", "collections", "<", "t", ">", "empty", "list", "(", ")", ";" ]
[ "this", "returns", "well", "known", "empty", "values", "for", "well", "-", "known", "java", "types", "this", "returns", "null", "for", "types", "not", "in", "the", "following", "list" ]
[ "return", "empties", "get", "(", "types", "get", "raw", "type", "(", "type", ")", ")", ";" ]
[ "adapted", "from", "{" ]
[ "if", "(", "reader", "=", "=", "null", ")", "{", "return", "null", ";", "}", "try", "{", "string", "builder", "to", "=", "new", "string", "builder", "(", ")", ";", "char", "buffer", "buf", "=", "char", "buffer", "allocate", "(", "buf", "size", ")", ";", "while", "(", "reader", "read", "(", "buf", ")", "!", "=", "-", "1", ")", "{", "buf", "flip", "(", ")", ";", "to", "append", "(", "buf", ")", ";", "buf", "clear", "(", ")", ";", "}", "return", "to", "to", "string", "(", ")", ";", "}", "finally", "{", "ensure", "closed", "(", "reader", ")", ";", "}" ]
[ "if", "the", "provided", "string", "is", "not", "null", "or", "empty" ]
[ "return", "value", "!", "=", "null", "&", "&", "!", "value", "is", "empty", "(", ")", ";" ]
[ "if", "the", "provided", "string", "is", "null", "or", "empty" ]
[ "return", "value", "=", "=", "null", "|", "|", "value", "is", "empty", "(", ")", ";" ]
[ "returns", "the", "index", "of", "the", "bootstrap", "method", "in", "the", "bootstrap", "methods", "attribute", "of", "the", "class" ]
[ "return", "u", "2bootstrap", "method", "attribute", "index", ";" ]
[ "lets", "the", "bootstrap", "method", "handle", "constant", "accept", "the", "given", "visitor" ]
[ "new", "bootstrap", "method", "handle", "traveler", "(", "constant", "visitor", ")", "visit", "invoke", "dynamic", "constant", "(", "clazz", ",", "this", ")", ";" ]
[ "implementations", "for", "constant" ]
[ "return", "class", "constants", "constant", "invoke", "dynamic", ";" ]
[ "shorten", "a", "qualified", "java", "name", "given", "the", "context" ]
[ "if", "(", "this", "java", "name", "!", "=", "null", ")", "{", "int", "last", "dot", "=", "0", ";", "string", "s", "1", "=", "java", "name", ",", "s", "2", "=", "this", "java", "name", "+", "'", "'", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "s", "1", "length", "(", ")", "&", "&", "i", "<", "s", "2", "length", "(", ")", ";", "i", "+", "+", ")", "{", "if", "(", "s", "1", "char", "at", "(", "i", ")", "!", "=", "s", "2", "char", "at", "(", "i", ")", ")", "{", "break", ";", "}", "else", "if", "(", "s", "1", "char", "at", "(", "i", ")", "=", "=", "'", "'", ")", "{", "last", "dot", "=", "i", ";", "}", "}", "if", "(", "last", "dot", ">", "0", ")", "{", "java", "name", "=", "java", "name", "substring", "(", "last", "dot", "+", "1", ")", ";", "}", "}", "return", "java", "name", ";" ]
[ "returns", "a", "middleman", "for", "all", "files", "to", "build", "for", "the", "given", "configured", "target", "if", "multiple", "calls", "are", "made", "then", "it", "returns", "the", "same", "artifact", "for", "configurations", "with", "the", "same", "internal", "directory" ]
[ "return", "nested", "set", "builder", "wrap", "(", "order", "stable", "order", ",", "get", "middleman", "internal", "(", "rule", "context", "get", "analysis", "environment", "(", ")", ",", "rule", "context", ",", "rule", "context", "get", "action", "owner", "(", ")", ",", "purpose", ",", "files", "to", "build", ")", ")", ";" ]
[ "internal", "implementation", "for", "get", "aggregating", "middleman", "/", "get", "aggregating", "middleman", "with", "solib", "symlinks" ]
[ "if", "(", "files", "to", "build", "=", "=", "null", ")", "{", "return", "immutable", "list", "of", "(", ")", ";", "}", "middleman", "factory", "factory", "=", "env", "get", "middleman", "factory", "(", ")", ";", "return", "immutable", "list", "of", "(", "factory", "create", "middleman", "allow", "multiple", "(", "env", ",", "action", "owner", ",", "rule", "context", "get", "package", "directory", "(", ")", ",", "purpose", ",", "files", "to", "build", ",", "rule", "context", "get", "configuration", "(", ")", "get", "middleman", "directory", "(", "rule", "context", "get", "rule", "(", ")", "get", "repository", "(", ")", ")", ")", ")", ";" ]
[ "returns", "a", "middleman", "for", "all", "files", "to", "build", "for", "the", "given", "configured", "target", "if", "multiple", "calls", "are", "made", "then", "it", "returns", "the", "same", "artifact", "for", "configurations", "with", "the", "same", "internal", "directory" ]
[ "return", "nested", "set", "builder", "wrap", "(", "order", "stable", "order", ",", "get", "middleman", "internal", "(", "rule", "context", "get", "analysis", "environment", "(", ")", ",", "rule", "context", ",", "rule", "context", "get", "action", "owner", "(", ")", ",", "purpose", ",", "dep", ")", ")", ";" ]
[ "internal", "implementation", "for", "get", "aggregating", "middleman", "/", "get", "aggregating", "middleman", "with", "solib", "symlinks" ]
[ "if", "(", "dep", "=", "=", "null", ")", "{", "return", "immutable", "list", "of", "(", ")", ";", "}", "middleman", "factory", "factory", "=", "env", "get", "middleman", "factory", "(", ")", ";", "iterable", "<", "artifact", ">", "artifacts", "=", "dep", "get", "provider", "(", "file", "provider", "class", ")", "get", "files", "to", "build", "(", ")", ";", "return", "immutable", "list", "of", "(", "factory", "create", "middleman", "allow", "multiple", "(", "env", ",", "action", "owner", ",", "rule", "context", "get", "package", "directory", "(", ")", ",", "purpose", ",", "artifacts", ",", "rule", "context", "get", "configuration", "(", ")", "get", "middleman", "directory", "(", "rule", "context", "get", "rule", "(", ")", "get", "repository", "(", ")", ")", ")", ")", ";" ]
[ "convenience", "method", "to", "construct", "an", "array", "of", "<", "code", ">", "default", "record", "listener", "provider", "<", "/", "code", ">", "from", "an", "array", "of", "<", "code", ">", "record", "listener", "<", "/", "code", ">", "instances" ]
[ "record", "listener", "provider", "[", "]", "result", "=", "new", "record", "listener", "provider", "[", "listeners", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "listeners", "length", ";", "i", "+", "+", ")", "result", "[", "i", "]", "=", "new", "default", "record", "listener", "provider", "(", "listeners", "[", "i", "]", ")", ";", "return", "result", ";" ]
[ "{" ]
[ "return", "listener", ";" ]
[ "use", "{" ]
[ "return", "max", "auto", "retries", "next", "server", ";" ]
[ "use", "{" ]
[ "this", "max", "auto", "retries", "next", "server", "=", "max", "auto", "retries", "next", "server", ";" ]
[ "use", "{" ]
[ "return", "max", "auto", "retries", ";" ]
[ "use", "{" ]
[ "this", "max", "auto", "retries", "=", "max", "auto", "retries", ";" ]
[ "/", "*", "protected", "boolean", "is", "retriable", "(", "t", "request", ")", "{", "if", "(", "request", "is", "retriable", "(", ")", ")", "{", "return", "true", ";", "}", "else", "{", "boolean", "retry", "okay", "on", "operation", "=", "ok", "to", "retry", "on", "all", "operations", ";", "i", "client", "config", "overridden", "client", "config", "=", "request", "get", "override", "config", "(", ")", ";", "if", "(", "overridden", "client", "config", "!", "=", "null", ")", "{", "retry", "okay", "on", "operation", "=", "overridden", "client", "config", "get", "property", "as", "boolean", "(", "common", "client", "config", "key", "request", "specific", "retry", "on", "ok", "to", "retry", "on", "all", "operations", ")", ";", "}", "return", "retry", "okay", "on", "operation", ";", "}", "}" ]
[ "int", "num", "retries", "=", "max", "auto", "retries", "next", "server", ";", "if", "(", "overridden", "client", "config", "!", "=", "null", ")", "{", "num", "retries", "=", "overridden", "client", "config", "get", "property", "as", "integer", "(", "common", "client", "config", "key", "max", "auto", "retries", "next", "server", ",", "max", "auto", "retries", "next", "server", ")", ";", "}", "return", "num", "retries", ";" ]
[ "make", "sure", "that", "parse", "error", "occurs" ]
[ "grid", "test", "utils", "assert", "throws", "(", "null", ",", "new", "callable", "<", "void", ">", "(", ")", "{", "@", "override", "public", "void", "call", "(", ")", "throws", "exception", "{", "new", "sql", "parser", "(", "schema", ",", "sql", ")", "next", "command", "(", ")", ";", "return", "null", ";", "}", "}", ",", "sql", "parse", "exception", "class", ",", "msg", ")", ";" ]
[ "sets", "<", "code", ">", "create", "empty", "subject", "<", "/", "code", ">", "if", "the", "value", "is", "<", "code", ">", "true", "<", "/", "code", ">", "and", "{", "@", "link", "#", "obtain", "subject", "(", "servlet", "request", ")", "}", "returns", "<", "code", ">", "null", "<", "/", "code", ">", "an", "empty", "writeable", "<", "code", ">", "subject", "<", "/", "code", ">", "is", "created", "instead", "otherwise", "no", "<", "code", ">", "subject", "<", "/", "code", ">", "is", "used", "the", "default", "is", "<", "code", ">", "false", "<", "/", "code", ">" ]
[ "this", "create", "empty", "subject", "=", "create", "empty", "subject", ";" ]
[ "<", "p", ">", "the", "name", "of", "your", "database", "for", "which", "to", "get", "log", "streams", "<", "/", "p", ">" ]
[ "set", "relational", "database", "name", "(", "relational", "database", "name", ")", ";", "return", "this", ";" ]
[ "create", "an", "activity", "options", "specifying", "a", "custom", "animation", "to", "run", "when", "the", "activity", "is", "displayed" ]
[ "return", "make", "custom", "animation", "(", "context", ",", "enter", "res", "id", ",", "exit", "res", "id", ",", "null", ",", "null", ")", ";" ]
[ "create", "an", "activity", "options", "specifying", "a", "custom", "animation", "to", "run", "when", "the", "activity", "is", "displayed" ]
[ "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "opts", "m", "package", "name", "=", "context", "get", "package", "name", "(", ")", ";", "opts", "m", "animation", "type", "=", "anim", "custom", ";", "opts", "m", "custom", "enter", "res", "id", "=", "enter", "res", "id", ";", "opts", "m", "custom", "exit", "res", "id", "=", "exit", "res", "id", ";", "opts", "set", "on", "animation", "started", "listener", "(", "handler", ",", "listener", ")", ";", "return", "opts", ";" ]
[ "create", "an", "activity", "options", "specifying", "an", "animation", "where", "the", "new", "activity", "is", "scaled", "from", "a", "small", "originating", "area", "of", "the", "screen", "to", "its", "final", "full", "representation" ]
[ "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "opts", "m", "package", "name", "=", "source", "get", "context", "(", ")", "get", "package", "name", "(", ")", ";", "opts", "m", "animation", "type", "=", "anim", "scale", "up", ";", "int", "[", "]", "pts", "=", "new", "int", "[", "2", "]", ";", "source", "get", "location", "on", "screen", "(", "pts", ")", ";", "opts", "m", "start", "x", "=", "pts", "[", "0", "]", "+", "start", "x", ";", "opts", "m", "start", "y", "=", "pts", "[", "1", "]", "+", "start", "y", ";", "opts", "m", "width", "=", "width", ";", "opts", "m", "height", "=", "height", ";", "return", "opts", ";" ]
[ "create", "an", "activity", "options", "specifying", "an", "animation", "where", "the", "new", "activity", "is", "revealed", "from", "a", "small", "originating", "area", "of", "the", "screen", "to", "its", "final", "full", "representation" ]
[ "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "opts", "m", "animation", "type", "=", "anim", "clip", "reveal", ";", "int", "[", "]", "pts", "=", "new", "int", "[", "2", "]", ";", "source", "get", "location", "on", "screen", "(", "pts", ")", ";", "opts", "m", "start", "x", "=", "pts", "[", "0", "]", "+", "start", "x", ";", "opts", "m", "start", "y", "=", "pts", "[", "1", "]", "+", "start", "y", ";", "opts", "m", "width", "=", "width", ";", "opts", "m", "height", "=", "height", ";", "return", "opts", ";" ]
[ "creates", "an", "{" ]
[ "activity", "options", "options", "=", "new", "activity", "options", "(", ")", ";", "options", "m", "animation", "type", "=", "anim", "open", "cross", "profile", "apps", ";", "return", "options", ";" ]
[ "create", "an", "activity", "options", "specifying", "an", "animation", "where", "a", "thumbnail", "is", "scaled", "from", "a", "given", "position", "to", "the", "new", "activity", "window", "that", "is", "being", "started" ]
[ "return", "make", "thumbnail", "scale", "up", "animation", "(", "source", ",", "thumbnail", ",", "start", "x", ",", "start", "y", ",", "null", ")", ";" ]
[ "create", "an", "activity", "options", "specifying", "an", "animation", "where", "a", "thumbnail", "is", "scaled", "from", "a", "given", "position", "to", "the", "new", "activity", "window", "that", "is", "being", "started" ]
[ "return", "make", "thumbnail", "animation", "(", "source", ",", "thumbnail", ",", "start", "x", ",", "start", "y", ",", "listener", ",", "true", ")", ";" ]
[ "create", "an", "activity", "options", "specifying", "an", "animation", "where", "a", "list", "of", "activity", "windows", "and", "thumbnails", "are", "aspect", "scaled", "to", "/", "from", "a", "new", "location" ]
[ "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "opts", "m", "package", "name", "=", "context", "get", "package", "name", "(", ")", ";", "opts", "m", "animation", "type", "=", "scale", "up", "?", "anim", "thumbnail", "aspect", "scale", "up", ":", "anim", "thumbnail", "aspect", "scale", "down", ";", "opts", "m", "specs", "future", "=", "specs", "future", ";", "opts", "set", "on", "animation", "started", "listener", "(", "handler", ",", "listener", ")", ";", "return", "opts", ";" ]
[ "create", "an", "activity", "options", "specifying", "an", "animation", "where", "the", "new", "activity", "window", "and", "a", "thumbnail", "is", "aspect", "-", "scaled", "to", "a", "new", "location" ]
[ "return", "make", "aspect", "scaled", "thumbnail", "animation", "(", "source", ",", "thumbnail", ",", "start", "x", ",", "start", "y", ",", "target", "width", ",", "target", "height", ",", "handler", ",", "listener", ",", "false", ")", ";" ]
[ "create", "an", "activity", "options", "to", "transition", "between", "activities", "using", "cross", "-", "activity", "scene", "animations", "this", "method", "carries", "the", "position", "of", "one", "shared", "element", "to", "the", "started", "activity", "the", "position", "of", "<", "code", ">", "shared", "element", "<", "/", "code", ">", "will", "be", "used", "as", "the", "epicenter", "for", "the", "exit", "transition", "the", "position", "of", "the", "shared", "element", "in", "the", "launched", "activity", "will", "be", "the", "epicenter", "of", "its", "entering", "transition" ]
[ "return", "make", "scene", "transition", "animation", "(", "activity", ",", "pair", "create", "(", "shared", "element", ",", "shared", "element", "name", ")", ")", ";" ]
[ "create", "an", "activity", "options", "to", "transition", "between", "activities", "using", "cross", "-", "activity", "scene", "animations", "this", "method", "carries", "the", "position", "of", "multiple", "shared", "elements", "to", "the", "started", "activity", "the", "position", "of", "the", "first", "element", "in", "shared", "elements", "will", "be", "used", "as", "the", "epicenter", "for", "the", "exit", "transition", "the", "position", "of", "the", "associated", "shared", "element", "in", "the", "launched", "activity", "will", "be", "the", "epicenter", "of", "its", "entering", "transition" ]
[ "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "make", "scene", "transition", "animation", "(", "activity", ",", "activity", "get", "window", "(", ")", ",", "opts", ",", "activity", "m", "exit", "transition", "listener", ",", "shared", "elements", ")", ";", "return", "opts", ";" ]
[ "call", "this", "immediately", "prior", "to", "start", "activity", "to", "begin", "a", "shared", "element", "transition", "from", "a", "non", "-", "activity", "the", "window", "must", "support", "window", "feature", "activity", "transitions", "the", "exit", "transition", "will", "start", "immediately", "and", "the", "shared", "element", "transition", "will", "start", "once", "the", "launched", "activity", "s", "shared", "element", "is", "ready", "<", "p", ">", "when", "all", "transitions", "have", "completed", "and", "the", "shared", "element", "has", "been", "transfered", "the", "window", "s", "decor", "view", "will", "have", "its", "visibility", "set", "to", "view", "gone" ]
[ "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "final", "view", "decor", "view", "=", "window", "get", "decor", "view", "(", ")", ";", "if", "(", "decor", "view", "=", "=", "null", ")", "{", "return", "opts", ";", "}", "final", "exit", "transition", "coordinator", "exit", "=", "make", "scene", "transition", "animation", "(", "null", ",", "window", ",", "opts", ",", "null", ",", "shared", "elements", ")", ";", "if", "(", "exit", "!", "=", "null", ")", "{", "hide", "window", "listener", "listener", "=", "new", "hide", "window", "listener", "(", "window", ",", "exit", ")", ";", "exit", "set", "hide", "shared", "elements", "callback", "(", "listener", ")", ";", "exit", "start", "exit", "(", ")", ";", "}", "return", "opts", ";" ]
[ "this", "method", "should", "be", "called", "when", "the", "{", "@", "link", "#", "start", "shared", "element", "animation", "(", "window", "pair", "[", "]", ")", "}", "animation", "must", "be", "stopped", "and", "the", "views", "reset", "this", "can", "happen", "if", "there", "was", "an", "error", "from", "start", "activity", "or", "a", "springboard", "activity", "and", "the", "animation", "should", "stop", "and", "reset" ]
[ "final", "view", "decor", "view", "=", "window", "get", "decor", "view", "(", ")", ";", "if", "(", "decor", "view", "=", "=", "null", ")", "{", "return", ";", "}", "final", "exit", "transition", "coordinator", "exit", "=", "(", "exit", "transition", "coordinator", ")", "decor", "view", "get", "tag", "(", "com", "android", "internal", "r", "id", "cross", "task", "transition", ")", ";", "if", "(", "exit", "!", "=", "null", ")", "{", "exit", "cancel", "pending", "transitions", "(", ")", ";", "decor", "view", "set", "tag", "internal", "(", "com", "android", "internal", "r", "id", "cross", "task", "transition", ",", "null", ")", ";", "transition", "manager", "end", "transitions", "(", "(", "view", "group", ")", "decor", "view", ")", ";", "exit", "reset", "views", "(", ")", ";", "exit", "clear", "state", "(", ")", ";", "decor", "view", "set", "visibility", "(", "view", "visible", ")", ";", "}" ]
[ "if", "set", "along", "with", "intent", "flag", "activity", "new", "document", "then", "the", "task", "being", "launched", "will", "not", "be", "presented", "to", "the", "user", "but", "will", "instead", "be", "only", "available", "through", "the", "recents", "task", "list", "in", "addition", "the", "new", "task", "wil", "be", "affiliated", "with", "the", "launching", "activity", "s", "task", "affiliated", "tasks", "are", "grouped", "together", "in", "the", "recents", "task", "list" ]
[ "final", "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "opts", "m", "animation", "type", "=", "anim", "launch", "task", "behind", ";", "return", "opts", ";" ]
[ "create", "a", "basic", "activity", "options", "that", "has", "no", "special", "animation", "associated", "with", "it", "other", "options", "can", "still", "be", "set" ]
[ "final", "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "return", "opts", ";" ]
[ "create", "an", "{" ]
[ "final", "activity", "options", "opts", "=", "new", "activity", "options", "(", ")", ";", "opts", "m", "remote", "animation", "adapter", "=", "remote", "animation", "adapter", ";", "opts", "m", "animation", "type", "=", "anim", "remote", "animation", ";", "return", "opts", ";" ]
[ "sets", "the", "bounds", "(", "window", "size", ")", "that", "the", "activity", "should", "be", "launched", "in", "rect", "position", "should", "be", "provided", "in", "pixels", "and", "in", "screen", "coordinates", "set", "to", "null", "explicitly", "for", "fullscreen", "<", "p", ">", "<", "strong", ">", "note", ":", "<", "strong", "/", ">", "this", "value", "is", "ignored", "on", "devices", "that", "don", "t", "have", "{" ]
[ "m", "launch", "bounds", "=", "screen", "space", "pixel", "rect", "!", "=", "null", "?", "new", "rect", "(", "screen", "space", "pixel", "rect", ")", ":", "null", ";", "return", "this", ";" ]
[ "returns", "the", "bounds", "that", "should", "be", "used", "to", "launch", "the", "activity" ]
[ "return", "m", "launch", "bounds", ";" ]
[ "the", "thumbnail", "is", "copied", "into", "a", "hardware", "bitmap", "when", "it", "is", "bundled", "and", "sent", "to", "the", "system", "so", "it", "should", "always", "be", "backed", "by", "a", "graphic", "buffer", "on", "the", "other", "end" ]
[ "return", "m", "thumbnail", "!", "=", "null", "?", "m", "thumbnail", "create", "graphic", "buffer", "handle", "(", ")", ":", "null", ";" ]
[ "returns", "whether", "or", "not", "the", "activity", "options", "was", "created", "with", "{", "@", "link", "#", "start", "shared", "element", "animation", "(", "window", "pair", "[", "]", ")", "}" ]
[ "return", "m", "exit", "coordinator", "index", "<", "0", ";" ]
[ "gets", "whether", "the", "activity", "is", "to", "be", "launched", "into", "lock", "task", "mode" ]
[ "return", "m", "lock", "task", "mode", ";" ]
[ "sets", "whether", "the", "activity", "is", "to", "be", "launched", "into", "lock", "task", "mode" ]
[ "m", "lock", "task", "mode", "=", "lock", "task", "mode", ";", "return", "this", ";" ]
[ "gets", "the", "id", "of", "the", "display", "where", "activity", "should", "be", "launched" ]
[ "return", "m", "launch", "display", "id", ";" ]
[ "sets", "the", "id", "of", "the", "display", "where", "activity", "should", "be", "launched", "an", "app", "can", "launch", "activities", "on", "public", "displays", "or", "private", "displays", "that", "are", "owned", "by", "the", "app", "or", "where", "an", "app", "already", "has", "activities", "otherwise", "trying", "to", "launch", "on", "a", "private", "display", "or", "providing", "an", "invalid", "display", "id", "will", "result", "in", "an", "exception", "<", "p", ">", "setting", "launch", "display", "id", "will", "be", "ignored", "on", "devices", "that", "don", "t", "have", "{" ]
[ "m", "launch", "display", "id", "=", "launch", "display", "id", ";", "return", "this", ";" ]