docstring_tokens
sequence
code_tokens
sequence
[ "encode", "the", "given", "uri", "fragment", "with", "the", "given", "encoding" ]
[ "public", "static", "string", "encode", "fragment", "(", "string", "fragment", ",", "charset", "charset", ")", "{", "return", "encode", "(", "fragment", ",", "charset", ",", "hierarchical", "uri", "components", "type", "fragment", ")", ";", "}" ]
[ "route", "to", "the", "supplied", "router", "function", "if", "the", "given", "request", "predicate", "applies", "this", "method", "can", "be", "used", "to", "create", "nested", "routes", ",", "where", "a", "group", "of", "routes", "share", "a", "common", "path", "(", "prefix", ")", ",", "header", ",", "or", "other", "request", "predicate", "for", "instance", ",", "the", "following", "example", "creates", "a", "nested", "route", "with", "a", "\"", "user", "\"", "path", "predicate", ",", "so", "that", "get", "requests", "for", "\"", "user", "\"", "will", "list", "users", ",", "and", "post", "request", "for", "\"", "user", "\"", "will", "create", "a", "new", "user", "<", "pre", "class", "=", "\"", "code", "\"", ">", "router", "function", "&", "lt", ";", "server", "response", "&", "gt", ";", "nested", "route", "=", "router", "functions", "route", "(", ")", "nest", "(", "request", "predicates", "path", "(", "\"", "user", "\"", ")", ",", "(", ")", "-", ">", "router", "functions", "route", "(", ")", "get", "(", "this", ":", ":", "list", "users", ")", "post", "(", "this", ":", ":", "create", "user", ")", "build", "(", ")", ")", "build", "(", ")", ";" ]
[ "builder", "nest", "(", "request", "predicate", "predicate", ",", "supplier", "<", "router", "function", "<", "server", "response", ">", ">", "router", "function", "supplier", ")", ";" ]
[ "tear", "-", "down", "method", "for", "user", "-", "defined", "function", "it", "can", "be", "used", "for", "clean", "up", "work", "by", "default", ",", "this", "method", "does", "nothing" ]
[ "public", "void", "close", "(", ")", "throws", "exception", "{", "/", "/", "do", "nothing", "}" ]
[ "service", "<", "-", "-", ">", "application", "mapping", "-", "-", "start" ]
[ "default", "set", "<", "string", ">", "get", "service", "app", "mapping", "(", "string", "service", "key", ",", "mapping", "listener", "listener", ",", "url", "url", ")", "{", "return", "collections", "empty", "set", "(", ")", ";", "}" ]
[ "sets", "a", "list", "of", "indices", "that", "should", "be", "cloned", "from", "the", "source", "to", "the", "target", "snapshot", "the", "list", "of", "indices", "supports", "multi", "-", "index", "syntax", "for", "example", ":", "\"", "+", "test", "\"", ",", "\"", "-", "test", "4", "2", "\"", "will", "clone", "all", "indices", "with", "prefix", "\"", "test", "\"", "except", "index", "\"", "test", "4", "2", "\"" ]
[ "public", "clone", "snapshot", "request", "builder", "set", "indices", "(", "string", "indices", ")", "{", "request", "indices", "(", "indices", ")", ";", "return", "this", ";", "}" ]
[ "start", "execution", "at", "the", "specified", "address", "using", "the", "initial", "context", "specified", "method", "will", "block", "until", "execution", "stops", "this", "method", "will", "initialize", "context", "register", "based", "upon", "the", "program", "stored", "context", "if", "not", "already", "done", "in", "addition", ",", "both", "general", "register", "value", "and", "the", "context", "register", "may", "be", "further", "modified", "via", "the", "context", "parameter", "if", "specified" ]
[ "public", "boolean", "run", "(", "address", "addr", ",", "processor", "context", "context", ",", "task", "monitor", "monitor", ")", "throws", "cancelled", "exception", "{", "if", "(", "emulator", "is", "executing", "(", ")", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "emulator", "is", "already", "running", "\"", ")", ";", "}", "/", "/", "initialize", "context", "program", "context", "program", "context", "=", "program", "get", "program", "context", "(", ")", ";", "register", "base", "context", "register", "=", "program", "context", "get", "base", "context", "register", "(", ")", ";", "register", "value", "context", "reg", "value", "=", "null", ";", "boolean", "must", "set", "context", "reg", "=", "false", ";", "if", "(", "base", "context", "register", "!", "=", "null", ")", "{", "context", "reg", "value", "=", "get", "context", "register", "(", ")", ";", "if", "(", "context", "reg", "value", "=", "=", "null", ")", "{", "context", "reg", "value", "=", "program", "context", "get", "register", "value", "(", "base", "context", "register", ",", "addr", ")", ";", "must", "set", "context", "reg", "=", "(", "context", "reg", "value", "!", "=", "null", ")", ";", "}", "}", "if", "(", "context", "!", "=", "null", ")", "{", "for", "(", "register", "reg", ":", "context", "get", "registers", "(", ")", ")", "{", "/", "/", "skip", "non", "-", "base", "registers", "if", "(", "reg", "is", "base", "register", "(", ")", "&", "&", "context", "has", "value", "(", "reg", ")", ")", "{", "register", "value", "register", "value", "=", "context", "get", "register", "value", "(", "reg", ")", ";", "if", "(", "reg", "is", "processor", "context", "(", ")", ")", "{", "if", "(", "context", "reg", "value", "!", "=", "null", ")", "{", "context", "reg", "value", "=", "context", "reg", "value", "combine", "values", "(", "register", "value", ")", ";", "}", "else", "{", "context", "reg", "value", "=", "register", "value", ";", "}", "must", "set", "context", "reg", "=", "true", ";", "}", "else", "{", "big", "integer", "value", "=", "register", "value", "get", "unsigned", "value", "ignore", "mask", "(", ")", ";", "write", "register", "(", "reg", ",", "value", ")", ";", "}", "}", "}", "}", "long", "pc", "value", "=", "addr", "get", "addressable", "word", "offset", "(", ")", ";", "emulator", "set", "execute", "address", "(", "pc", "value", ")", ";", "if", "(", "must", "set", "context", "reg", ")", "{", "set", "context", "register", "(", "context", "reg", "value", ")", ";", "}", "continue", "execution", "(", "monitor", ")", ";", "return", "emulator", "is", "at", "breakpoint", "(", ")", ";", "}" ]
[ "this", "method", "assumes", "that", "the", "context", "environment", "is", "prepared", ",", "or", "the", "execution", "will", "be", "a", "local", "execution", "by", "default" ]
[ "public", "void", "invoke", "interactive", "mode", "for", "execution", "(", ")", "throws", "program", "invocation", "exception", "{", "call", "main", "method", "(", "main", "class", ",", "args", ")", ";", "}" ]
[ "invoke", "{", "@", "code", "do", "rollback", "}", ",", "handling", "rollback", "exceptions", "properly" ]
[ "private", "void", "do", "rollback", "on", "commit", "exception", "(", "default", "transaction", "status", "status", ",", "throwable", "ex", ")", "throws", "transaction", "exception", "{", "try", "{", "if", "(", "status", "is", "new", "transaction", "(", ")", ")", "{", "if", "(", "status", "is", "debug", "(", ")", ")", "{", "logger", "debug", "(", "\"", "initiating", "transaction", "rollback", "after", "commit", "exception", "\"", ",", "ex", ")", ";", "}", "do", "rollback", "(", "status", ")", ";", "}", "else", "if", "(", "status", "has", "transaction", "(", ")", "&", "&", "is", "global", "rollback", "on", "participation", "failure", "(", ")", ")", "{", "if", "(", "status", "is", "debug", "(", ")", ")", "{", "logger", "debug", "(", "\"", "marking", "existing", "transaction", "as", "rollback", "-", "only", "after", "commit", "exception", "\"", ",", "ex", ")", ";", "}", "do", "set", "rollback", "only", "(", "status", ")", ";", "}", "}", "catch", "(", "runtime", "exception", "|", "error", "rbex", ")", "{", "logger", "error", "(", "\"", "commit", "exception", "overridden", "by", "rollback", "exception", "\"", ",", "ex", ")", ";", "trigger", "after", "completion", "(", "status", ",", "transaction", "synchronization", "status", "unknown", ")", ";", "throw", "rbex", ";", "}", "trigger", "after", "completion", "(", "status", ",", "transaction", "synchronization", "status", "rolled", "back", ")", ";", "}" ]
[ "verifies", "that", "all", "operator", "states", "can", "be", "mapped", "to", "an", "execution", "job", "vertex" ]
[ "private", "static", "void", "check", "state", "mapping", "completeness", "(", "boolean", "allow", "non", "restored", "state", ",", "map", "<", "operator", "i", "d", ",", "operator", "state", ">", "operator", "states", ",", "set", "<", "execution", "job", "vertex", ">", "tasks", ")", "{", "set", "<", "operator", "i", "d", ">", "all", "operator", "i", "ds", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "for", "(", "execution", "job", "vertex", "execution", "job", "vertex", ":", "tasks", ")", "{", "for", "(", "operator", "i", "d", "pair", "operator", "i", "d", "pair", ":", "execution", "job", "vertex", "get", "operator", "i", "ds", "(", ")", ")", "{", "all", "operator", "i", "ds", "add", "(", "operator", "i", "d", "pair", "get", "generated", "operator", "i", "d", "(", ")", ")", ";", "operator", "i", "d", "pair", "get", "user", "defined", "operator", "i", "d", "(", ")", "if", "present", "(", "all", "operator", "i", "ds", ":", ":", "add", ")", ";", "}", "}", "for", "(", "map", "entry", "<", "operator", "i", "d", ",", "operator", "state", ">", "operator", "group", "state", "entry", ":", "operator", "states", "entry", "set", "(", ")", ")", "{", "operator", "state", "operator", "state", "=", "operator", "group", "state", "entry", "get", "value", "(", ")", ";", "/", "/", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "find", "operator", "for", "/", "/", "state", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "if", "(", "!", "all", "operator", "i", "ds", "contains", "(", "operator", "group", "state", "entry", "get", "key", "(", ")", ")", ")", "{", "if", "(", "allow", "non", "restored", "state", ")", "{", "log", "info", "(", "\"", "skipped", "checkpoint", "state", "for", "operator", "{", "}", "\"", ",", "operator", "state", "get", "operator", "i", "d", "(", ")", ")", ";", "}", "else", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "there", "is", "no", "operator", "for", "the", "state", "\"", "+", "operator", "state", "get", "operator", "i", "d", "(", ")", ")", ";", "}", "}", "}", "}" ]
[ "get", "prefix", "ns", "wrapped", "array" ]
[ "public", "list", "<", "integer", ">", "get", "prefix", "ns", "wrapped", "array", "(", ")", "{", "return", "prefix", "ns", "wrapped", "array", ";", "}" ]
[ "match", "by", "message", "content", "which", "are", "stored", "in", "commit", "log", "<", "br", ">", "{", "@", "code", "msg", "buffer", "}", "and", "{", "@", "code", "properties", "}", "are", "not", "all", "null", "if", "invoked", "in", "store", ",", "{", "@", "code", "properties", "}", "is", "null", ";", "if", "invoked", "in", "{", "@", "code", "pull", "request", "hold", "service", "}", ",", "{", "@", "code", "msg", "buffer", "}", "is", "null" ]
[ "boolean", "is", "matched", "by", "commit", "log", "(", "final", "byte", "buffer", "msg", "buffer", ",", "final", "map", "<", "string", ",", "string", ">", "properties", ")", ";" ]
[ "sets", "the", "y", "position", "relative", "to", "the", "current", "position", "where", "the", "sprite", "will", "be", "drawn", "if", "origin", ",", "rotation", ",", "or", "scale", "are", "changed", ",", "it", "is", "slightly", "more", "efficient", "to", "translate", "after", "those", "operations" ]
[ "public", "void", "translate", "y", "(", "float", "y", "amount", ")", "{", "y", "+", "=", "y", "amount", ";", "if", "(", "dirty", ")", "return", ";", "final", "float", "[", "]", "vertices", "=", "this", "vertices", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "vertices", "length", ";", "i", "+", "=", "sprite", "vertex", "size", ")", "vertices", "[", "i", "]", "+", "=", "y", "amount", ";", "}" ]
[ "acquires", "a", "sample", "from", "the", "pool" ]
[ "sample", "acquire", "(", ")", "{", "sample", "acquired", "=", "head", ";", "if", "(", "acquired", "=", "=", "null", ")", "{", "acquired", "=", "new", "sample", "(", ")", ";", "}", "else", "{", "head", "=", "acquired", "next", ";", "}", "return", "acquired", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "static", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "choose", "num", "of", "replicas", "nodes", "from", "the", "racks", "that", "local", "machine", "is", "not", "on", "if", "not", "enough", "nodes", "are", "available", ",", "choose", "the", "remaining", "ones", "from", "the", "local", "rack" ]
[ "protected", "void", "choose", "remote", "rack", "(", "int", "num", "of", "replicas", ",", "datanode", "descriptor", "local", "machine", ",", "set", "<", "node", ">", "excluded", "nodes", ",", "long", "blocksize", ",", "int", "max", "replicas", "per", "rack", ",", "list", "<", "datanode", "storage", "info", ">", "results", ",", "boolean", "avoid", "stale", "nodes", ",", "enum", "map", "<", "storage", "type", ",", "integer", ">", "storage", "types", ")", "throws", "not", "enough", "replicas", "exception", "{", "int", "old", "num", "of", "replicas", "=", "results", "size", "(", ")", ";", "/", "/", "randomly", "choose", "one", "node", "from", "remote", "racks", "try", "{", "choose", "random", "(", "num", "of", "replicas", ",", "\"", "~", "\"", "+", "local", "machine", "get", "network", "location", "(", ")", ",", "excluded", "nodes", ",", "blocksize", ",", "max", "replicas", "per", "rack", ",", "results", ",", "avoid", "stale", "nodes", ",", "storage", "types", ")", ";", "}", "catch", "(", "not", "enough", "replicas", "exception", "e", ")", "{", "if", "(", "log", "is", "debug", "enabled", "(", ")", ")", "{", "log", "debug", "(", "\"", "failed", "to", "choose", "remote", "rack", "(", "location", "=", "~", "\"", "+", "local", "machine", "get", "network", "location", "(", ")", "+", "\"", ")", ",", "fallback", "to", "local", "rack", "\"", ",", "e", ")", ";", "}", "choose", "random", "(", "num", "of", "replicas", "-", "(", "results", "size", "(", ")", "-", "old", "num", "of", "replicas", ")", ",", "local", "machine", "get", "network", "location", "(", ")", ",", "excluded", "nodes", ",", "blocksize", ",", "max", "replicas", "per", "rack", ",", "results", ",", "avoid", "stale", "nodes", ",", "storage", "types", ")", ";", "}", "}" ]
[ "verify", "measure", "publication", "manually" ]
[ "public", "static", "void", "main", "(", "final", "string", "[", "]", "args", ")", "throws", "exception", "{", "final", "run", "run", "=", "new", "run", "(", "\"", "test", "-", "main", "\"", ")", ";", "for", "(", "int", "param", "=", "0", ";", "param", "<", "5", ";", "param", "+", "+", ")", "{", "final", "caliper", "measure", "measure", "=", "new", "caliper", "measure", "(", ")", ";", "measure", "variables", "(", ")", "put", "(", "\"", "param", "\"", ",", "string", "value", "of", "(", "param", ")", ")", ";", "for", "(", "int", "step", "=", "0", ";", "step", "<", "5", ";", "step", "+", "+", ")", "{", "measure", "rate", "(", ")", "mark", "(", "50", "+", "step", ")", ";", "final", "timer", "context", "time", "=", "measure", "time", "(", ")", "time", "(", ")", ";", "thread", "sleep", "(", "15", ")", ";", "time", "stop", "(", ")", ";", "measure", "size", "(", ")", "value", "(", "50", "+", "step", ")", ";", "measure", "mark", "(", ")", ";", "}", "measure", "append", "to", "(", "run", ")", ";", "}", "final", "result", "result", "=", "new", "result", "(", "run", ")", ";", "publish", "(", "result", ")", ";", "system", "out", "println", "(", "json", "(", "result", ")", ")", ";", "}" ]
[ "decode", "the", "token", "identifier", "the", "subclass", "can", "customize", "the", "way", "to", "decode", "the", "token", "identifier" ]
[ "public", "token", "ident", "decode", "token", "identifier", "(", "token", "<", "token", "ident", ">", "token", ")", "throws", "i", "o", "exception", "{", "return", "token", "decode", "identifier", "(", ")", ";", "}" ]
[ "retrieve", "the", "type", "name", "this", "value", "will", "be", "the", "same", "as", "the", "type", "name", "provided", "to", "the", "constructor", "or", "the", "fully", "-", "qualified", "class", "name", "if", "a", "class", "instance", "was", "provided", "to", "the", "constructor" ]
[ "public", "string", "get", "type", "name", "(", ")", "{", "return", "this", "type", "name", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "int", "hash", "code", "(", ")", "{", "return", "float", "float", "to", "int", "bits", "(", "width", ")", "^", "float", "float", "to", "int", "bits", "(", "height", ")", ";", "}" ]
[ "transformation", "hook", "to", "be", "implemented", "by", "subclasses", "the", "default", "implementation", "simply", "returns", "the", "given", "bytes", "as", "-", "is" ]
[ "protected", "byte", "[", "]", "transform", "if", "necessary", "(", "string", "name", ",", "byte", "[", "]", "bytes", ")", "{", "return", "bytes", ";", "}" ]
[ "accessor", "for", "the", "previous", "context" ]
[ "public", "security", "context", "get", "previous", "context", "2", "(", ")", "{", "return", "previous", "context", ";", "}" ]
[ "test", "generated", "permissions" ]
[ "public", "void", "test", "generated", "permissions", "(", ")", "throws", "exception", "{", "path", "path", "=", "create", "temp", "dir", "(", ")", ";", "/", "/", "make", "a", "fake", "es", "home", "and", "ensure", "we", "only", "grant", "permissions", "to", "that", "path", "es", "home", "=", "path", "resolve", "(", "\"", "es", "home", "\"", ")", ";", "settings", "builder", "settings", "builder", "=", "settings", "builder", "(", ")", ";", "settings", "builder", "put", "(", "environment", "path", "home", "setting", "get", "key", "(", ")", ",", "es", "home", "to", "string", "(", ")", ")", ";", "settings", "settings", "=", "settings", "builder", "build", "(", ")", ";", "path", "fake", "tmp", "dir", "=", "create", "temp", "dir", "(", ")", ";", "string", "real", "tmp", "dir", "=", "system", "get", "property", "(", "\"", "java", "io", "tmpdir", "\"", ")", ";", "permissions", "permissions", ";", "try", "{", "system", "set", "property", "(", "\"", "java", "io", "tmpdir", "\"", ",", "fake", "tmp", "dir", "to", "string", "(", ")", ")", ";", "environment", "environment", "=", "test", "environment", "new", "environment", "(", "settings", ")", ";", "permissions", "=", "security", "create", "permissions", "(", "environment", ")", ";", "}", "finally", "{", "system", "set", "property", "(", "\"", "java", "io", "tmpdir", "\"", ",", "real", "tmp", "dir", ")", ";", "}", "/", "/", "the", "fake", "es", "home", "assert", "no", "permissions", "(", "es", "home", ",", "permissions", ")", ";", "/", "/", "its", "parent", "assert", "no", "permissions", "(", "es", "home", "get", "parent", "(", ")", ",", "permissions", ")", ";", "/", "/", "some", "other", "sibling", "assert", "no", "permissions", "(", "es", "home", "get", "parent", "(", ")", "resolve", "(", "\"", "other", "\"", ")", ",", "permissions", ")", ";", "/", "/", "double", "check", "we", "overwrote", "java", "io", "tmpdir", "correctly", "for", "the", "test", "assert", "no", "permissions", "(", "path", "utils", "get", "(", "real", "tmp", "dir", ")", ",", "permissions", ")", ";", "}" ]
[ "join", "string", "like", "javascript" ]
[ "public", "static", "string", "join", "(", "string", "[", "]", "array", ",", "string", "split", ")", "{", "if", "(", "array", "utils", "is", "empty", "(", "array", ")", ")", "{", "return", "empty", "string", ";", "}", "string", "builder", "sb", "=", "new", "string", "builder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", "length", ";", "i", "+", "+", ")", "{", "if", "(", "i", ">", "0", ")", "{", "sb", "append", "(", "split", ")", ";", "}", "sb", "append", "(", "array", "[", "i", "]", ")", ";", "}", "return", "sb", "to", "string", "(", ")", ";", "}" ]
[ "a", "proctime", ">", "=", "b", "proctime", "-", "10", "and", "a", "proctime", "<", "=", "b", "proctime", "+", "20" ]
[ "public", "void", "test", "proc", "time", "inner", "join", "with", "common", "bounds", "(", ")", "throws", "exception", "{", "proc", "time", "interval", "join", "join", "process", "func", "=", "new", "proc", "time", "interval", "join", "(", "flink", "join", "type", "inner", ",", "-", "10", ",", "20", ",", "row", "type", ",", "row", "type", ",", "generated", "function", ")", ";", "keyed", "two", "input", "stream", "operator", "test", "harness", "<", "row", "data", ",", "row", "data", ",", "row", "data", ",", "row", "data", ">", "test", "harness", "=", "create", "test", "harness", "(", "join", "process", "func", ")", ";", "test", "harness", "open", "(", ")", ";", "test", "harness", "set", "processing", "time", "(", "1", ")", ";", "test", "harness", "process", "element", "1", "(", "insert", "record", "(", "1l", ",", "\"", "1a", "1", "\"", ")", ")", ";", "assert", "equals", "(", "1", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "test", "harness", "set", "processing", "time", "(", "2", ")", ";", "test", "harness", "process", "element", "1", "(", "insert", "record", "(", "2l", ",", "\"", "2a", "2", "\"", ")", ")", ";", "/", "/", "timers", "for", "key", "=", "1", "and", "key", "=", "2", "assert", "equals", "(", "2", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "test", "harness", "set", "processing", "time", "(", "3", ")", ";", "test", "harness", "process", "element", "1", "(", "insert", "record", "(", "1l", ",", "\"", "1a", "3", "\"", ")", ")", ";", "assert", "equals", "(", "4", ",", "test", "harness", "num", "keyed", "state", "entries", "(", ")", ")", ";", "/", "/", "the", "number", "of", "timers", "won", "'", "t", "increase", "assert", "equals", "(", "2", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "test", "harness", "process", "element", "2", "(", "insert", "record", "(", "1l", ",", "\"", "1b", "3", "\"", ")", ")", ";", "test", "harness", "set", "processing", "time", "(", "4", ")", ";", "test", "harness", "process", "element", "2", "(", "insert", "record", "(", "2l", ",", "\"", "2b", "4", "\"", ")", ")", ";", "/", "/", "the", "number", "of", "states", "should", "be", "doubled", "assert", "equals", "(", "8", ",", "test", "harness", "num", "keyed", "state", "entries", "(", ")", ")", ";", "assert", "equals", "(", "4", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "/", "/", "test", "for", "-", "10", "boundary", "(", "13", "-", "10", "=", "3", ")", "/", "/", "the", "left", "row", "(", "key", "=", "1", ")", "with", "timestamp", "=", "1", "will", "be", "eagerly", "removed", "here", "test", "harness", "set", "processing", "time", "(", "13", ")", ";", "test", "harness", "process", "element", "2", "(", "insert", "record", "(", "1l", ",", "\"", "1b", "1", "3", "\"", ")", ")", ";", "/", "/", "test", "for", "+", "20", "boundary", "(", "13", "+", "20", "=", "33", ")", "test", "harness", "set", "processing", "time", "(", "33", ")", ";", "assert", "equals", "(", "4", ",", "test", "harness", "num", "keyed", "state", "entries", "(", ")", ")", ";", "assert", "equals", "(", "2", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "test", "harness", "process", "element", "1", "(", "insert", "record", "(", "1l", ",", "\"", "1a", "3", "3", "\"", ")", ")", ";", "test", "harness", "process", "element", "1", "(", "insert", "record", "(", "2l", ",", "\"", "2a", "3", "3", "\"", ")", ")", ";", "/", "/", "the", "left", "row", "(", "key", "=", "2", ")", "with", "timestamp", "=", "2", "will", "be", "eagerly", "removed", "here", "test", "harness", "process", "element", "2", "(", "insert", "record", "(", "2l", ",", "\"", "2b", "3", "3", "\"", ")", ")", ";", "list", "<", "object", ">", "expected", "output", "=", "new", "array", "list", "<", ">", "(", ")", ";", "expected", "output", "add", "(", "insert", "record", "(", "1l", ",", "\"", "1a", "1", "\"", ",", "1l", ",", "\"", "1b", "3", "\"", ")", ")", ";", "expected", "output", "add", "(", "insert", "record", "(", "1l", ",", "\"", "1a", "3", "\"", ",", "1l", ",", "\"", "1b", "3", "\"", ")", ")", ";", "expected", "output", "add", "(", "insert", "record", "(", "2l", ",", "\"", "2a", "2", "\"", ",", "2l", ",", "\"", "2b", "4", "\"", ")", ")", ";", "expected", "output", "add", "(", "insert", "record", "(", "1l", ",", "\"", "1a", "3", "\"", ",", "1l", ",", "\"", "1b", "1", "3", "\"", ")", ")", ";", "expected", "output", "add", "(", "insert", "record", "(", "1l", ",", "\"", "1a", "3", "3", "\"", ",", "1l", ",", "\"", "1b", "1", "3", "\"", ")", ")", ";", "expected", "output", "add", "(", "insert", "record", "(", "2l", ",", "\"", "2a", "3", "3", "\"", ",", "2l", ",", "\"", "2b", "3", "3", "\"", ")", ")", ";", "assertor", "assert", "output", "equals", "(", "\"", "output", "wrong", "\"", ",", "expected", "output", ",", "test", "harness", "get", "output", "(", ")", ")", ";", "test", "harness", "close", "(", ")", ";", "}" ]
[ "get", "the", "o", "s", "gi", "bundle", "with", "the", "given", "bundle", "location", "identifier" ]
[ "bundle", "get", "o", "s", "gi", "bundle", "(", "string", "bundle", "location", ")", "{", "return", "framework", "bundle", "context", "get", "bundle", "(", "bundle", "location", ")", ";", "}" ]
[ "returns", "whether", "a", "next", "window", "exists", ",", "which", "may", "depend", "on", "the", "current", "repeat", "mode", "and", "whether", "shuffle", "mode", "is", "enabled", "note", ":", "when", "the", "repeat", "mode", "is", "{", "@", "link", "#", "repeat", "mode", "one", "}", ",", "this", "method", "behaves", "the", "same", "as", "when", "the", "current", "repeat", "mode", "is", "{", "@", "link", "#", "repeat", "mode", "off", "}", "see", "{", "@", "link", "#", "repeat", "mode", "one", "}", "for", "more", "details" ]
[ "boolean", "has", "next", "(", ")", ";" ]
[ "sets", "a", "column", "constraint", "for", "this", "rule", "if", "set", ",", "the", "rule", "'", "s", "token", "will", "only", "be", "returned", "if", "the", "pattern", "is", "detected", "starting", "at", "the", "specified", "column", "if", "the", "column", "is", "smaller", "then", "0", ",", "the", "column", "constraint", "is", "considered", "removed" ]
[ "public", "void", "set", "column", "constraint", "(", "int", "column", ")", "{", "if", "(", "column", "<", "0", ")", "column", "=", "undefined", ";", "f", "column", "=", "column", ";", "}" ]
[ "read", "bytes", "from", "the", "given", "position", "in", "the", "stream", "to", "the", "given", "buffer", "continues", "to", "read", "until", "<", "code", ">", "length", "<", "code", ">", "bytes", "have", "been", "read" ]
[ "public", "void", "read", "fully", "(", "long", "position", ",", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "i", "o", "exception", "{", "(", "(", "positioned", "readable", ")", "in", ")", "read", "fully", "(", "position", ",", "buffer", ",", "offset", ",", "length", ")", ";", "}" ]
[ "returns", "an", "array", "of", "strings", "to", "display", "for", "a", "row", "of", "symbol", "information" ]
[ "private", "string", "[", "]", "get", "symbol", "info", "(", "program", "pgm", ",", "symbol", "s", ")", "{", "return", "get", "symbol", "info", "(", "pgm", ",", "s", ",", "\"", "\"", ",", "\"", "\"", ")", ";", "}" ]
[ "convert", "the", "input", "to", "an", "int", "value" ]
[ "public", "int", "get", "value", "(", ")", "{", "return", "get", "int", "value", "(", ")", ";", "}" ]
[ "sets", "a", "transform", "callback" ]
[ "void", "set", "transform", "callback", "(", "transform", "callback", "transform", "callback", ")", ";" ]
[ "the", "init", "offset", "field", "(", "4", "bytes", ")", "indicates", "the", "offset", "(", "in", "bytes", ")", "from", "the", "beginning", "of", "the", "section", "to", "the", "initialization", "function", "'", "s", "transition", "vector" ]
[ "public", "int", "get", "init", "offset", "(", ")", "{", "return", "init", "offset", ";", "}" ]
[ "get", "photo", "urls" ]
[ "public", "list", "<", "string", ">", "get", "photo", "urls", "(", ")", "{", "return", "photo", "urls", ";", "}" ]
[ "wait", "up", "to", "wait", "milliseconds", "for", "the", "underlying", "threads", "to", "shutdown", "this", "method", "is", "expected", "to", "be", "used", "for", "testing", "only", "!", "!", "!" ]
[ "protected", "boolean", "testable", "wait", "for", "shutdown", "(", "int", "wait", ")", "throws", "interrupted", "exception", "{", "cnxn", "send", "thread", "join", "(", "wait", ")", ";", "if", "(", "cnxn", "send", "thread", "is", "alive", "(", ")", ")", "{", "return", "false", ";", "}", "cnxn", "event", "thread", "join", "(", "wait", ")", ";", "return", "!", "cnxn", "event", "thread", "is", "alive", "(", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "returns", "the", "sum", "of", "the", "sizes", "of", "all", "items", "in", "the", "cache" ]
[ "public", "synchronized", "long", "get", "current", "size", "(", ")", "{", "return", "current", "size", ";", "}" ]
[ "sets", "the", "size", "of", "the", "area", "(", "range", "on", "the", "y", "-", "axis", ")", "that", "should", "be", "maximum", "visible", "at", "once" ]
[ "public", "void", "set", "visible", "y", "range", "maximum", "(", "float", "max", "y", "range", ",", "axis", "dependency", "axis", ")", "{", "float", "y", "scale", "=", "get", "axis", "range", "(", "axis", ")", "/", "max", "y", "range", ";", "m", "view", "port", "handler", "set", "minimum", "scale", "y", "(", "y", "scale", ")", ";", "}" ]
[ "form", "parameter", "enum", "test", "(", "string", ")" ]
[ "public", "enum", "form", "string", "enum", "get", "enum", "form", "string", "(", ")", "{", "return", "enum", "form", "string", ";", "}" ]
[ "of", "the", "total", "physical", "memory", "of", "the", "system", ",", "available", "bytes" ]
[ "public", "long", "get", "available", "physical", "memory", "(", ")", "{", "return", "available", "physical", "memory", ";", "}" ]
[ "a", "version", "of", "{", "@", "link", "#", "delete", "dir", "(", "file", ",", "task", "monitor", ")", "}", "that", "does", "not", "alter", "the", "progress", "value", "of", "the", "given", "monitor", ",", "only", "the", "status", "text", "this", "allows", "this", "recursive", "method", "to", "send", "status", "updates", "while", "the", "caller", "of", "this", "method", "controls", "the", "progress" ]
[ "private", "final", "static", "boolean", "do", "delete", "dir", "(", "file", "dir", ",", "task", "monitor", "monitor", ")", "throws", "cancelled", "exception", "{", "file", "[", "]", "files", "=", "dir", "list", "files", "(", ")", ";", "if", "(", "files", "=", "=", "null", ")", "{", "return", "dir", "delete", "(", ")", ";", "}", "for", "(", "file", "file", ":", "files", ")", "{", "monitor", "check", "canceled", "(", ")", ";", "if", "(", "file", "is", "directory", "(", ")", ")", "{", "/", "/", "use", "a", "dummy", "monitor", "as", "not", "to", "ruin", "our", "progress", "if", "(", "!", "do", "delete", "dir", "(", "file", ",", "monitor", ")", ")", "{", "print", "debug", "(", "\"", "unable", "to", "delete", "directory", ":", "\"", "+", "file", ")", ";", "return", "false", ";", "}", "}", "else", "{", "monitor", "set", "message", "(", "\"", "deleting", "file", ":", "\"", "+", "file", ")", ";", "if", "(", "!", "file", "delete", "(", ")", ")", "{", "print", "debug", "(", "\"", "unable", "to", "delete", "file", ":", "\"", "+", "file", ")", ";", "return", "false", ";", "}", "}", "}", "return", "dir", "delete", "(", ")", ";", "}" ]
[ "data", "dir", ",", "such", "as", "datadatatinker", "sample", "androidtinker" ]
[ "public", "static", "file", "get", "patch", "directory", "(", "context", "context", ")", "{", "application", "info", "application", "info", "=", "context", "get", "application", "info", "(", ")", ";", "if", "(", "application", "info", "=", "=", "null", ")", "{", "/", "/", "looks", "like", "running", "on", "a", "test", "context", ",", "so", "just", "return", "without", "patching", "return", "null", ";", "}", "final", "string", "dir", "name", "=", "(", "\"", "oppo", "\"", "equals", "ignore", "case", "(", "build", "manufacturer", ")", "&", "&", "build", "version", "sdk", "int", "=", "=", "22", ")", "?", "share", "constants", "patch", "directory", "name", "spec", ":", "share", "constants", "patch", "directory", "name", ";", "return", "new", "file", "(", "application", "info", "data", "dir", ",", "dir", "name", ")", ";", "}" ]
[ "returns", "the", "method", "name", "of", "the", "current", "test" ]
[ "public", "static", "string", "test", "method", "name", "(", "test", "name", "test", "name", ")", "{", "string", "test", "method", "name", "=", "test", "name", "get", "method", "name", "(", ")", ";", "if", "(", "test", "method", "name", "contains", "(", "\"", "[", "\"", ")", ")", "{", "test", "method", "name", "=", "test", "method", "name", "substring", "(", "0", ",", "test", "method", "name", "index", "of", "(", "'", "[", "'", ")", ")", ";", "}", "return", "test", "method", "name", ";", "}" ]
[ "this", "method", "initializes", "an", "rm", "with", "the", "given", "configuration", "and", "expects", "it", "to", "fail", "with", "a", "configuration", "error" ]
[ "private", "void", "check", "bad", "configuration", "(", "configuration", "conf", ")", "{", "mock", "r", "m", "rm", "1", "=", "null", ";", "conf", "set", "(", "yarn", "configuration", "rm", "ha", "id", ",", "\"", "rm", "1", "\"", ")", ";", "try", "{", "rm", "1", "=", "new", "mock", "r", "m", "(", "conf", ")", ";", "rm", "1", "init", "(", "conf", ")", ";", "fail", "(", "\"", "the", "rm", "allowed", "an", "invalid", "configuration", "\"", ")", ";", "}", "catch", "(", "yarn", "runtime", "exception", "e", ")", "{", "assert", "true", "(", "\"", "the", "rm", "initialization", "threw", "an", "unexpected", "exception", "\"", ",", "e", "get", "message", "(", ")", "starts", "with", "(", "h", "a", "util", "bad", "config", "message", "prefix", ")", ")", ";", "}", "}" ]
[ "register", "extend", "health", "checker" ]
[ "public", "static", "void", "register", "health", "checker", "(", "string", "type", ",", "class", "<", "?", "extends", "abstract", "health", "checker", ">", "health", "checker", "class", ")", "{", "if", "(", "!", "extend", "contains", "key", "(", "type", ")", ")", "{", "extend", "put", "(", "type", ",", "health", "checker", "class", ")", ";", "health", "checker", "factory", "register", "sub", "type", "(", "health", "checker", "class", ",", "type", ")", ";", "}", "}" ]
[ "perform", "the", "sql", "call", "and", "return", "a", "{", "@", "link", "mono", "}", "that", "completes", "without", "result", "on", "statement", "completion" ]
[ "mono", "<", "void", ">", "then", "(", ")", ";" ]
[ "returns", "a", "list", "of", "available", "mock", "resolvers", "if", "any" ]
[ "public", "static", "list", "<", "mock", "resolver", ">", "get", "mock", "resolvers", "(", ")", "{", "return", "registry", "get", "mock", "resolvers", "(", ")", ";", "}" ]
[ "check", "and", ",", "if", "necessary", ",", "publish", "this", "{", "@", "link", "http", "resource", "}", "this", "will", "perform", "the", "check", "regardless", "of", "the", "{", "@", "linkplain", "#", "is", "dirty", "(", ")", "dirtiness", "}", "and", "it", "will", "update", "the", "dirtiness", "using", "this", "directly", "can", "be", "useful", "if", "there", "is", "ever", "a", "need", "to", "double", "-", "check", "dirtiness", "without", "having", "to", "{", "@", "linkplain", "#", "mark", "dirty", "(", ")", "mark", "}", "it", "as", "dirty", "if", "you", "do", "mark", "this", "as", "dirty", "while", "this", "is", "running", "(", "e", "g", ",", "asynchronously", "something", "invalidates", "a", "resource", ")", ",", "then", "the", "resource", "will", "still", "be", "dirty", "at", "the", "end", ",", "but", "the", "success", "of", "it", "will", "still", "return", "based", "on", "the", "checks", "it", "ran" ]
[ "public", "final", "void", "check", "and", "publish", "(", "final", "rest", "client", "client", ",", "final", "action", "listener", "<", "resource", "publish", "result", ">", "listener", ")", "{", "/", "/", "we", "always", "check", "when", "asked", ",", "regardless", "of", "clean", "or", "dirty", ",", "but", "we", "do", "not", "run", "parallel", "checks", "if", "(", "state", "get", "and", "set", "(", "state", "checking", ")", "!", "=", "state", "checking", ")", "{", "do", "check", "and", "publish", "(", "client", ",", "action", "listener", "wrap", "(", "publish", "result", "-", ">", "{", "state", "compare", "and", "set", "(", "state", "checking", ",", "publish", "result", "success", "?", "state", "clean", ":", "state", "dirty", ")", ";", "listener", "on", "response", "(", "publish", "result", ")", ";", "}", ",", "e", "-", ">", "{", "state", "compare", "and", "set", "(", "state", "checking", ",", "state", "dirty", ")", ";", "listener", "on", "failure", "(", "e", ")", ";", "}", ")", ")", ";", "}", "else", "{", "listener", "on", "response", "(", "resource", "publish", "result", "in", "progress", "(", ")", ")", ";", "}", "}" ]
[ "returns", "the", "context" ]
[ "a", "m", "r", "m", "proxy", "application", "context", "get", "application", "context", "(", ")", ";" ]
[ "tests", "that", "if", "we", "add", "extra", "'", "safe", "'", "characters", "they", "remain", "unescaped" ]
[ "public", "void", "test", "custom", "escaper", "(", ")", "{", "unicode", "escaper", "e", "=", "new", "percent", "escaper", "(", "\"", "+", "*", "/", "-", "\"", ",", "false", ")", ";", "for", "(", "char", "c", "=", "0", ";", "c", "<", "128", ";", "c", "+", "+", ")", "{", "if", "(", "(", "c", ">", "=", "'", "0", "'", "&", "&", "c", "<", "=", "'", "9", "'", ")", "|", "|", "(", "c", ">", "=", "'", "a", "'", "&", "&", "c", "<", "=", "'", "z", "'", ")", "|", "|", "(", "c", ">", "=", "'", "a", "'", "&", "&", "c", "<", "=", "'", "z", "'", ")", "|", "|", "\"", "+", "*", "/", "-", "\"", "index", "of", "(", "c", ")", ">", "=", "0", ")", "{", "assert", "unescaped", "(", "e", ",", "c", ")", ";", "}", "else", "{", "assert", "escaping", "(", "e", ",", "escape", "ascii", "(", "c", ")", ",", "c", ")", ";", "}", "}", "}" ]
[ "returns", "an", "immutable", "list", "of", "the", "elements", "between", "the", "specified", "{", "@", "code", "from", "index", "}", ",", "inclusive", ",", "and", "{", "@", "code", "to", "index", "}", ",", "exclusive", "(", "if", "{", "@", "code", "from", "index", "}", "and", "{", "@", "code", "to", "index", "}", "are", "equal", ",", "the", "empty", "immutable", "list", "is", "returned", ")" ]
[ "public", "immutable", "list", "<", "e", ">", "sub", "list", "(", "int", "from", "index", ",", "int", "to", "index", ")", "{", "check", "position", "indexes", "(", "from", "index", ",", "to", "index", ",", "size", "(", ")", ")", ";", "int", "length", "=", "to", "index", "-", "from", "index", ";", "if", "(", "length", "=", "=", "size", "(", ")", ")", "{", "return", "this", ";", "}", "else", "if", "(", "length", "=", "=", "0", ")", "{", "return", "of", "(", ")", ";", "}", "else", "if", "(", "length", "=", "=", "1", ")", "{", "return", "of", "(", "get", "(", "from", "index", ")", ")", ";", "}", "else", "{", "return", "sub", "list", "unchecked", "(", "from", "index", ",", "to", "index", ")", ";", "}", "}" ]
[ "helper", "method", "to", "format", "dates", "during", "processing" ]
[ "private", "string", "format", "date", "(", "long", "date", ")", "{", "return", "date", "format", "format", "(", "new", "date", "(", "date", ")", ")", ";", "}" ]
[ "return", "the", "drawable", "in", "cache" ]
[ "public", "drawable", "get", "drawable", "(", "@", "non", "null", "final", "string", "key", ",", "final", "drawable", "default", "value", ")", "{", "drawable", "obj", "=", "m", "cache", "memory", "utils", "get", "(", "key", ")", ";", "if", "(", "obj", "!", "=", "null", ")", "return", "obj", ";", "return", "m", "cache", "disk", "utils", "get", "drawable", "(", "key", ",", "default", "value", ")", ";", "}" ]
[ "returns", "a", "new", ",", "empty", "{", "@", "code", "enum", "bi", "map", "}", "using", "the", "specified", "key", "and", "value", "types" ]
[ "public", "static", "<", "k", "extends", "enum", "<", "k", ">", ",", "v", "extends", "enum", "<", "v", ">", ">", "enum", "bi", "map", "<", "k", ",", "v", ">", "create", "(", "class", "<", "k", ">", "key", "type", ",", "class", "<", "v", ">", "value", "type", ")", "{", "return", "new", "enum", "bi", "map", "<", ">", "(", "key", "type", ",", "value", "type", ")", ";", "}" ]
[ "create", "a", "path", "tuple", "of", "(", "container", ",", "path", ")", ",", "where", "the", "container", "is", "chosen", "from", "the", "host", "of", "the", "uri" ]
[ "public", "static", "swift", "object", "path", "from", "path", "(", "uri", "uri", ",", "path", "path", ")", "throws", "swift", "configuration", "exception", "{", "return", "from", "path", "(", "uri", ",", "path", ",", "false", ")", ";", "}" ]
[ "evicts", "from", "the", "admission", "window", "into", "the", "probation", "space", "if", "the", "size", "exceeds", "the", "maximum", ",", "then", "the", "admission", "candidate", "and", "probation", "'", "s", "victim", "are", "evaluated", "and", "one", "is", "evicted" ]
[ "private", "void", "evict", "(", ")", "{", "if", "(", "window", "size", "<", "=", "max", "window", ")", "{", "return", ";", "}", "node", "candidate", "=", "head", "window", "next", ";", "window", "size", "-", "-", ";", "candidate", "remove", "(", ")", ";", "candidate", "queue", "=", "probation", ";", "candidate", "append", "to", "tail", "(", "head", "probation", ")", ";", "if", "(", "data", "size", "(", ")", ">", "maximum", "size", ")", "{", "node", "victim", "=", "head", "probation", "next", ";", "node", "evict", "=", "admittor", "admit", "(", "candidate", "key", ",", "victim", "key", ")", "?", "victim", ":", "candidate", ";", "data", "remove", "(", "evict", "key", ")", ";", "evict", "remove", "(", ")", ";", "policy", "stats", "record", "eviction", "(", ")", ";", "}", "}" ]
[ "this", "method", "is", "called", "by", "the", "task", "manager", "when", "this", "task", "is", "cancelled" ]
[ "final", "void", "cancel", "(", "string", "reason", ")", "{", "assert", "reason", "!", "=", "null", ";", "if", "(", "cancelled", "compare", "and", "set", "(", "false", ",", "true", ")", ")", "{", "this", "reason", "=", "reason", ";", "on", "cancelled", "(", ")", ";", "}", "}" ]
[ "test", "the", "property", "'", "color", "'" ]
[ "public", "void", "color", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "color", "}" ]
[ "convert", "a", "user", "supplied", "java", "timestamp", "format", "to", "a", "grok", "pattern", "and", "simple", "regular", "expression" ]
[ "static", "tuple", "<", "string", ",", "string", ">", "override", "format", "to", "grok", "and", "regex", "(", "string", "override", "format", ")", "{", "if", "(", "override", "format", "index", "of", "(", "'", "\\", "n", "'", ")", ">", "=", "0", "|", "|", "override", "format", "index", "of", "(", "'", "\\", "r", "'", ")", ">", "=", "0", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "multi", "-", "line", "timestamp", "formats", "[", "\"", "+", "override", "format", "+", "\"", "]", "not", "supported", "\"", ")", ";", "}", "if", "(", "override", "format", "index", "of", "(", "indeterminate", "field", "placeholder", ")", ">", "=", "0", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "timestamp", "format", "[", "\"", "+", "override", "format", "+", "\"", "]", "not", "supported", "because", "it", "contains", "[", "\"", "+", "indeterminate", "field", "placeholder", "+", "\"", "]", "\"", ")", ";", "}", "string", "builder", "grok", "pattern", "builder", "=", "new", "string", "builder", "(", ")", ";", "string", "builder", "regex", "builder", "=", "new", "string", "builder", "(", ")", ";", "boolean", "not", "quoted", "=", "true", ";", "char", "prev", "char", "=", "'", "\\", "0", "'", ";", "string", "prev", "letter", "group", "=", "null", ";", "int", "pos", "=", "0", ";", "while", "(", "pos", "<", "override", "format", "length", "(", ")", ")", "{", "char", "cur", "char", "=", "override", "format", "char", "at", "(", "pos", ")", ";", "if", "(", "cur", "char", "=", "=", "'", "\\", "'", "'", ")", "{", "not", "quoted", "=", "!", "not", "quoted", ";", "}", "else", "if", "(", "not", "quoted", "&", "&", "character", "is", "letter", "(", "cur", "char", ")", ")", "{", "int", "start", "pos", "=", "pos", ";", "int", "end", "pos", "=", "start", "pos", "+", "1", ";", "while", "(", "end", "pos", "<", "override", "format", "length", "(", ")", "&", "&", "override", "format", "char", "at", "(", "end", "pos", ")", "=", "=", "cur", "char", ")", "{", "+", "+", "end", "pos", ";", "+", "+", "pos", ";", "}", "string", "letter", "group", "=", "override", "format", "substring", "(", "start", "pos", ",", "end", "pos", ")", ";", "tuple", "<", "string", ",", "string", ">", "grok", "pattern", "and", "regex", "for", "group", "=", "valid", "letter", "groups", "get", "(", "letter", "group", ")", ";", "if", "(", "grok", "pattern", "and", "regex", "for", "group", "=", "=", "null", ")", "{", "/", "/", "special", "case", "of", "fractional", "seconds", "if", "(", "cur", "char", "!", "=", "'", "s", "'", "|", "|", "fractional", "second", "separators", "index", "of", "(", "prev", "char", ")", "=", "=", "-", "1", "|", "|", "\"", "ss", "\"", "equals", "(", "prev", "letter", "group", ")", "=", "=", "false", "|", "|", "end", "pos", "-", "start", "pos", ">", "9", ")", "{", "string", "msg", "=", "\"", "letter", "group", "[", "\"", "+", "letter", "group", "+", "\"", "]", "in", "[", "\"", "+", "override", "format", "+", "\"", "]", "is", "not", "supported", "\"", ";", "if", "(", "cur", "char", "=", "=", "'", "s", "'", ")", "{", "msg", "+", "=", "\"", "because", "it", "is", "not", "preceded", "by", "[", "ss", "]", "and", "a", "separator", "from", "[", "\"", "+", "fractional", "second", "separators", "+", "\"", "]", "\"", ";", "}", "throw", "new", "illegal", "argument", "exception", "(", "msg", ")", ";", "}", "/", "/", "no", "need", "to", "append", "to", "the", "grok", "pattern", "as", "%", "{", "second", "}", "already", "allows", "for", "an", "optional", "fraction", ",", "/", "/", "but", "we", "need", "to", "remove", "the", "separator", "that", "'", "s", "included", "in", "%", "{", "second", "}", "(", "and", "that", "might", "be", "escaped", ")", "int", "num", "chars", "to", "delete", "=", "(", "punctuation", "that", "needs", "escaping", "in", "regex", "index", "of", "(", "prev", "char", ")", ">", "=", "0", ")", "?", "2", ":", "1", ";", "grok", "pattern", "builder", "delete", "(", "grok", "pattern", "builder", "length", "(", ")", "-", "num", "chars", "to", "delete", ",", "grok", "pattern", "builder", "length", "(", ")", ")", ";", "regex", "builder", "append", "(", "\"", "\\", "\\", "d", "{", "\"", ")", "append", "(", "end", "pos", "-", "start", "pos", ")", "append", "(", "'", "}", "'", ")", ";", "}", "else", "{", "grok", "pattern", "builder", "append", "(", "grok", "pattern", "and", "regex", "for", "group", "v", "1", "(", ")", ")", ";", "if", "(", "regex", "builder", "length", "(", ")", "=", "=", "0", ")", "{", "regex", "builder", "append", "(", "\"", "\\", "\\", "b", "\"", ")", ";", "}", "regex", "builder", "append", "(", "grok", "pattern", "and", "regex", "for", "group", "v", "2", "(", ")", ")", ";", "}", "if", "(", "pos", "+", "1", "=", "=", "override", "format", "length", "(", ")", ")", "{", "regex", "builder", "append", "(", "\"", "\\", "\\", "b", "\"", ")", ";", "}", "prev", "letter", "group", "=", "letter", "group", ";", "}", "else", "{", "if", "(", "punctuation", "that", "needs", "escaping", "in", "regex", "index", "of", "(", "cur", "char", ")", ">", "=", "0", ")", "{", "grok", "pattern", "builder", "append", "(", "'", "\\", "\\", "'", ")", ";", "regex", "builder", "append", "(", "'", "\\", "\\", "'", ")", ";", "}", "grok", "pattern", "builder", "append", "(", "cur", "char", ")", ";", "regex", "builder", "append", "(", "cur", "char", ")", ";", "}", "prev", "char", "=", "cur", "char", ";", "+", "+", "pos", ";", "}", "if", "(", "prev", "letter", "group", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "no", "time", "format", "letter", "groups", "in", "override", "format", "[", "\"", "+", "override", "format", "+", "\"", "]", "\"", ")", ";", "}", "return", "new", "tuple", "<", ">", "(", "grok", "pattern", "builder", "to", "string", "(", ")", ",", "regex", "builder", "to", "string", "(", ")", ")", ";", "}" ]
[ "get", "boolean", "value" ]
[ "public", "boolean", "get", "boolean", "(", "int", "index", ",", "boolean", "def", ")", "{", "object", "tmp", "=", "m", "array", "get", "(", "index", ")", ";", "return", "tmp", "instanceof", "boolean", "?", "(", "(", "boolean", ")", "tmp", ")", "boolean", "value", "(", ")", ":", "def", ";", "}" ]
[ "returns", "the", "java", "class", "name", "to", "obj", "c", "class", "name", "mapping", "files", "j", "2", "obj", "c", "transpiler", "and", "j", "2", "obj", "c", "proto", "plugin", "needs", "this", "mapping", "files", "to", "support", "\"", "objc", "class", "prefix", "\"", "proto", "option", ",", "which", "sets", "the", "obj", "c", "class", "prefix", "on", "generated", "protos" ]
[ "public", "nested", "set", "<", "artifact", ">", "get", "class", "mapping", "files", "(", ")", "{", "return", "class", "mapping", "files", ";", "}" ]
[ "accessible", "for", "{", "@", "link", "ast", "visitor", "}", ",", "use", "{", "@", "link", "ast", "visitor", "#", "process", "(", "node", ",", "object", ")", "}", "instead" ]
[ "protected", "<", "r", ",", "c", ">", "r", "accept", "(", "ast", "visitor", "<", "r", ",", "c", ">", "visitor", ",", "c", "context", ")", "{", "return", "visitor", "visit", "node", "(", "this", ",", "context", ")", ";", "}" ]
[ "handle", "http", "delete", "request", "for", "the", "root" ]
[ "public", "response", "delete", "root", "(", "@", "context", "final", "user", "group", "information", "ugi", ",", "@", "query", "param", "(", "delegation", "param", "name", ")", "@", "default", "value", "(", "delegation", "param", "default", ")", "final", "delegation", "param", "delegation", ",", "@", "query", "param", "(", "user", "param", "name", ")", "@", "default", "value", "(", "user", "param", "default", ")", "final", "user", "param", "username", ",", "@", "query", "param", "(", "do", "as", "param", "name", ")", "@", "default", "value", "(", "do", "as", "param", "default", ")", "final", "do", "as", "param", "do", "as", "user", ",", "@", "query", "param", "(", "delete", "op", "param", "name", ")", "@", "default", "value", "(", "delete", "op", "param", "default", ")", "final", "delete", "op", "param", "op", ",", "@", "query", "param", "(", "recursive", "param", "name", ")", "@", "default", "value", "(", "recursive", "param", "default", ")", "final", "recursive", "param", "recursive", ",", "@", "query", "param", "(", "snapshot", "name", "param", "name", ")", "@", "default", "value", "(", "snapshot", "name", "param", "default", ")", "final", "snapshot", "name", "param", "snapshot", "name", ")", "throws", "i", "o", "exception", ",", "interrupted", "exception", "{", "return", "delete", "(", "ugi", ",", "delegation", ",", "username", ",", "do", "as", "user", ",", "root", ",", "op", ",", "recursive", ",", "snapshot", "name", ")", ";", "}" ]
[ "reads", "the", "next", "{", "@", "code", "length", "}", "bytes", "into", "{", "@", "code", "buffer", "}", "at", "{", "@", "code", "offset", "}" ]
[ "public", "void", "read", "bytes", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "system", "arraycopy", "(", "data", ",", "position", ",", "buffer", ",", "offset", ",", "length", ")", ";", "position", "+", "=", "length", ";", "}" ]
[ "returns", "the", "greatest", "value", "present", "in", "{", "@", "code", "array", "}", ",", "using", "the", "same", "rules", "of", "comparison", "as", "{", "@", "link", "math", "#", "max", "(", "double", ",", "double", ")", "}" ]
[ "public", "static", "double", "max", "(", "double", "array", ")", "{", "check", "argument", "(", "array", "length", ">", "0", ")", ";", "double", "max", "=", "array", "[", "0", "]", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "array", "length", ";", "i", "+", "+", ")", "{", "max", "=", "math", "max", "(", "max", ",", "array", "[", "i", "]", ")", ";", "}", "return", "max", ";", "}" ]
[ "get", "the", "buffer", "node", "at", "the", "current", "checkpoint", "level" ]
[ "private", "buffer", "node", "get", "cached", "buffer", "node", "(", "int", "id", ")", "throws", "i", "o", "exception", "{", "if", "(", "buffer", "table", "=", "=", "null", ")", "{", "throw", "new", "closed", "exception", "(", ")", ";", "}", "buffer", "node", "buf", "list", "head", "=", "(", "buffer", "node", ")", "buffer", "table", "get", "(", "id", ")", ";", "buffer", "node", "node", "=", "null", ";", "if", "(", "buf", "list", "head", "!", "=", "null", ")", "{", "node", "=", "buf", "list", "head", "next", "version", ";", "}", "return", "node", ";", "}" ]
[ "creates", "an", "empty", "{", "@", "code", "tree", "range", "set", "}", "instance" ]
[ "public", "static", "<", "c", "extends", "comparable", "<", "?", ">", ">", "tree", "range", "set", "<", "c", ">", "create", "(", ")", "{", "return", "new", "tree", "range", "set", "<", "c", ">", "(", "new", "tree", "map", "<", "cut", "<", "c", ">", ",", "range", "<", "c", ">", ">", "(", ")", ")", ";", "}" ]
[ "registers", "actions", "to", "perform", "j", "2", "objc", "dead", "code", "removal" ]
[ "private", "void", "register", "j", "2", "objc", "dead", "code", "removal", "actions", "(", "objc", "provider", "objc", "provider", ",", "j", "2", "objc", "mapping", "file", "provider", "j", "2", "objc", "mapping", "file", "provider", ",", "j", "2", "objc", "entry", "class", "provider", "j", "2", "objc", "entry", "class", "provider", ")", "{", "nested", "set", "<", "string", ">", "entry", "classes", "=", "j", "2", "objc", "entry", "class", "provider", "get", "entry", "classes", "(", ")", ";", "artifact", "pruner", "=", "rule", "context", "get", "prerequisite", "artifact", "(", "\"", "$", "j", "2objc", "dead", "code", "pruner", "\"", ")", ";", "nested", "set", "<", "artifact", ">", "j", "2", "objc", "dependency", "mapping", "files", "=", "j", "2", "objc", "mapping", "file", "provider", "get", "dependency", "mapping", "files", "(", ")", ";", "nested", "set", "<", "artifact", ">", "j", "2", "objc", "header", "mapping", "files", "=", "j", "2", "objc", "mapping", "file", "provider", "get", "header", "mapping", "files", "(", ")", ";", "nested", "set", "<", "artifact", ">", "j", "2", "objc", "archive", "source", "mapping", "files", "=", "j", "2", "objc", "mapping", "file", "provider", "get", "archive", "source", "mapping", "files", "(", ")", ";", "for", "(", "artifact", "j", "2objc", "archive", ":", "objc", "provider", "get", "(", "objc", "provider", "j2objc", "library", ")", "to", "list", "(", ")", ")", "{", "artifact", "pruned", "j", "2", "objc", "archive", "=", "intermediate", "artifacts", "j", "2objc", "pruned", "archive", "(", "j", "2objc", "archive", ")", ";", "artifact", "dummy", "archive", "=", "rule", "context", "get", "prerequisite", "(", "\"", "$", "dummy", "lib", "\"", ",", "objc", "provider", "starlark", "constructor", ")", "get", "(", "library", ")", "get", "singleton", "(", ")", ";", "custom", "command", "line", "command", "line", "=", "custom", "command", "line", "builder", "(", ")", "add", "exec", "path", "(", "\"", "-", "-", "input", "archive", "\"", ",", "j", "2objc", "archive", ")", "add", "exec", "path", "(", "\"", "-", "-", "output", "archive", "\"", ",", "pruned", "j", "2", "objc", "archive", ")", "add", "exec", "path", "(", "\"", "-", "-", "dummy", "archive", "\"", ",", "dummy", "archive", ")", "add", "exec", "path", "(", "\"", "-", "-", "xcrunwrapper", "\"", ",", "xcrunwrapper", "(", "rule", "context", ")", "get", "executable", "(", ")", ")", "add", "exec", "paths", "(", "\"", "-", "-", "dependency", "mapping", "files", "\"", ",", "vector", "arg", "join", "(", "\"", ",", "\"", ")", "each", "(", "j", "2", "objc", "dependency", "mapping", "files", ")", ")", "add", "exec", "paths", "(", "\"", "-", "-", "header", "mapping", "files", "\"", ",", "vector", "arg", "join", "(", "\"", ",", "\"", ")", "each", "(", "j", "2", "objc", "header", "mapping", "files", ")", ")", "add", "exec", "paths", "(", "\"", "-", "-", "archive", "source", "mapping", "files", "\"", ",", "vector", "arg", "join", "(", "\"", ",", "\"", ")", "each", "(", "j", "2", "objc", "archive", "source", "mapping", "files", ")", ")", "add", "(", "\"", "-", "-", "entry", "classes", "\"", ")", "add", "all", "(", "vector", "arg", "join", "(", "\"", ",", "\"", ")", "each", "(", "entry", "classes", ")", ")", "build", "(", ")", ";", "rule", "context", "register", "action", "(", "objc", "rule", "classes", "spawn", "apple", "env", "action", "builder", "(", "xcode", "config", "info", "from", "rule", "context", "(", "rule", "context", ")", ",", "apple", "configuration", "get", "single", "arch", "platform", "(", ")", ")", "set", "mnemonic", "(", "\"", "dummy", "pruner", "\"", ")", "set", "executable", "(", "pruner", ")", "add", "input", "(", "dummy", "archive", ")", "add", "input", "(", "pruner", ")", "add", "input", "(", "j", "2objc", "archive", ")", "add", "input", "(", "xcrunwrapper", "(", "rule", "context", ")", "get", "executable", "(", ")", ")", "add", "transitive", "inputs", "(", "j", "2", "objc", "dependency", "mapping", "files", ")", "add", "transitive", "inputs", "(", "j", "2", "objc", "header", "mapping", "files", ")", "add", "transitive", "inputs", "(", "j", "2", "objc", "archive", "source", "mapping", "files", ")", "add", "command", "line", "(", "command", "line", ",", "param", "file", "info", "builder", "(", "parameter", "file", "parameter", "file", "type", "unquoted", ")", "set", "charset", "(", "iso", "8859", "1", ")", "set", "use", "always", "(", "true", ")", "build", "(", ")", ")", "add", "output", "(", "pruned", "j", "2", "objc", "archive", ")", "build", "(", "rule", "context", ")", ")", ";", "}", "}" ]
[ "implementation", "for", "generation", "of", "relative", "path", "blob", "sas", "uri" ]
[ "public", "uri", "get", "relative", "blob", "s", "a", "s", "uri", "(", "string", "account", "name", ",", "string", "container", ",", "string", "relative", "path", ")", "throws", "s", "a", "s", "key", "generation", "exception", "{", "cloud", "blob", "container", "sc", "=", "null", ";", "cloud", "blob", "client", "client", "=", "null", ";", "cached", "s", "a", "s", "key", "entry", "cache", "key", "=", "null", ";", "try", "{", "cache", "key", "=", "new", "cached", "s", "a", "s", "key", "entry", "(", "account", "name", ",", "container", ",", "relative", "path", ")", ";", "uri", "cache", "result", "=", "cache", "get", "(", "cache", "key", ")", ";", "if", "(", "cache", "result", "!", "=", "null", ")", "{", "return", "cache", "result", ";", "}", "cloud", "storage", "account", "account", "=", "get", "s", "a", "s", "key", "based", "storage", "account", "instance", "(", "account", "name", ")", ";", "client", "=", "account", "create", "cloud", "blob", "client", "(", ")", ";", "sc", "=", "client", "get", "container", "reference", "(", "container", ")", ";", "}", "catch", "(", "u", "r", "i", "syntax", "exception", "uri", "syntax", "ex", ")", "{", "throw", "new", "s", "a", "s", "key", "generation", "exception", "(", "\"", "encountered", "u", "r", "i", "syntax", "exception", "\"", "+", "\"", "while", "getting", "container", "references", "for", "container", "\"", "+", "container", "+", "\"", "inside", "storage", "account", ":", "\"", "+", "account", "name", ",", "uri", "syntax", "ex", ")", ";", "}", "catch", "(", "storage", "exception", "sto", "ex", ")", "{", "throw", "new", "s", "a", "s", "key", "generation", "exception", "(", "\"", "encountered", "storage", "exception", "while", "\"", "+", "\"", "getting", "container", "references", "for", "container", "\"", "+", "container", "+", "\"", "inside", "storage", "account", ":", "\"", "+", "account", "name", ",", "sto", "ex", ")", ";", "}", "cloud", "block", "blob", "blob", "=", "null", ";", "try", "{", "blob", "=", "sc", "get", "block", "blob", "reference", "(", "relative", "path", ")", ";", "}", "catch", "(", "u", "r", "i", "syntax", "exception", "uri", "syntax", "ex", ")", "{", "throw", "new", "s", "a", "s", "key", "generation", "exception", "(", "\"", "encountered", "u", "r", "i", "syntax", "exception", "while", "\"", "+", "\"", "getting", "block", "blob", "references", "for", "container", "\"", "+", "container", "+", "\"", "inside", "storage", "account", ":", "\"", "+", "account", "name", ",", "uri", "syntax", "ex", ")", ";", "}", "catch", "(", "storage", "exception", "sto", "ex", ")", "{", "throw", "new", "s", "a", "s", "key", "generation", "exception", "(", "\"", "encountered", "storage", "exception", "while", "\"", "+", "\"", "getting", "block", "blob", "references", "for", "container", "\"", "+", "container", "+", "\"", "inside", "storage", "account", ":", "\"", "+", "account", "name", ",", "sto", "ex", ")", ";", "}", "try", "{", "uri", "sas", "key", "=", "client", "get", "credentials", "(", ")", "transform", "uri", "(", "blob", "get", "uri", "(", ")", ")", ";", "cache", "put", "(", "cache", "key", ",", "sas", "key", ")", ";", "return", "sas", "key", ";", "}", "catch", "(", "storage", "exception", "sto", "ex", ")", "{", "throw", "new", "s", "a", "s", "key", "generation", "exception", "(", "\"", "encountered", "storage", "exception", "while", "\"", "+", "\"", "generating", "sas", "key", "for", "blob", ":", "\"", "+", "relative", "path", "+", "\"", "inside", "\"", "+", "\"", "container", ":", "\"", "+", "container", "+", "\"", "in", "storage", "account", ":", "\"", "+", "account", "name", ",", "sto", "ex", ")", ";", "}", "catch", "(", "u", "r", "i", "syntax", "exception", "uri", "syntax", "ex", ")", "{", "throw", "new", "s", "a", "s", "key", "generation", "exception", "(", "\"", "encountered", "u", "r", "i", "syntax", "exception", "\"", "+", "\"", "while", "generating", "sas", "key", "for", "blob", ":", "\"", "+", "relative", "path", "+", "\"", "inside", "\"", "+", "\"", "container", ":", "\"", "+", "container", "+", "\"", "in", "storage", "account", ":", "\"", "+", "account", "name", ",", "uri", "syntax", "ex", ")", ";", "}", "}" ]
[ "fills", "the", "complete", "bitmap", "with", "the", "currently", "set", "color" ]
[ "public", "void", "fill", "(", ")", "{", "pixmap", "clear", "(", "color", ")", ";", "}" ]
[ "gets", "called", "if", "a", "{", "@", "link", "throwable", "}", "was", "thrown" ]
[ "void", "exception", "caught", "(", "channel", "handler", "context", "ctx", ",", "throwable", "cause", ")", "throws", "exception", ";" ]
[ "model", "tests", "for", "additional", "properties", "string" ]
[ "public", "void", "test", "additional", "properties", "string", "(", ")", "{", "/", "/", "todo", ":", "test", "additional", "properties", "string", "}" ]
[ "set", "the", "delay", "between", "resize", "checks", "in", "milliseconds" ]
[ "public", "void", "set", "resize", "check", "delay", "(", "int", "resize", "check", "delay", ")", "{", "this", "resize", "check", "delay", "=", "resize", "check", "delay", ";", "}" ]
[ "writes", "a", "jar", "containing", "any", "sources", "generated", "by", "annotation", "processors" ]
[ "private", "static", "void", "write", "generated", "source", "output", "(", "path", "source", "gen", "dir", ",", "options", "parser", "options", "parser", ")", "throws", "i", "o", "exception", "{", "if", "(", "options", "parser", "get", "generated", "sources", "output", "jar", "(", ")", "=", "=", "null", ")", "{", "return", ";", "}", "jar", "creator", "jar", "=", "new", "jar", "creator", "(", "options", "parser", "get", "generated", "sources", "output", "jar", "(", ")", ")", ";", "jar", "set", "normalize", "(", "true", ")", ";", "jar", "set", "compression", "(", "options", "parser", "compress", "jar", "(", ")", ")", ";", "jar", "add", "directory", "(", "source", "gen", "dir", ")", ";", "jar", "execute", "(", ")", ";", "}" ]
[ "get", "the", "structure", "associated", "with", "a", "field", "token" ]
[ "public", "static", "structure", "get", "struct", "data", "type", "(", "clang", "token", "tok", ")", "{", "/", "/", "we", "already", "know", "tok", "is", "a", "clang", "field", "token", "clang", "field", "token", "fieldtok", "=", "(", "clang", "field", "token", ")", "tok", ";", "data", "type", "dt", "=", "fieldtok", "get", "data", "type", "(", ")", ";", "if", "(", "dt", "=", "=", "null", ")", "{", "return", "null", ";", "}", "if", "(", "dt", "instanceof", "type", "def", ")", "{", "dt", "=", "(", "(", "type", "def", ")", "dt", ")", "get", "base", "data", "type", "(", ")", ";", "}", "if", "(", "dt", "instanceof", "structure", ")", "{", "return", "(", "structure", ")", "dt", ";", "}", "return", "null", ";", "}" ]
[ "see", "{", "@", "link", "file", "status", "#", "is", "symlink", "(", ")", "}" ]
[ "boolean", "is", "symlink", "(", ")", ";" ]
[ "call", "this", "when", "the", "server", "has", "returned", "that", "it", "was", "successful", "in", "requesting", "a", "code", "via", "the", "specified", "mode" ]
[ "public", "void", "on", "successful", "request", "(", "@", "non", "null", "registration", "code", "request", "mode", "mode", ",", "@", "non", "null", "string", "e", "1", "6", "4", "number", ",", "long", "current", "time", ")", "{", "data", "map", "put", "(", "mode", ",", "new", "data", "(", "e", "1", "6", "4", "number", ",", "current", "time", "+", "time", "period", ")", ")", ";", "}" ]
[ "try", "to", "handle", "the", "given", "event", ",", "if", "it", "is", "applicable" ]
[ "public", "boolean", "handle", "(", "event", "event", ")", ";" ]
[ "check", "if", "the", "relative", "path", "is", "really", "a", "descendant", "of", "this", "folder", ",", "following", "the", "symbolic", "links", "meant", "to", "be", "used", "in", "coordination", "with", "{", "@", "link", "#", "child", "(", "string", ")", "}", "todo", "un", "-", "restrict", "it", "in", "a", "weekly", "after", "the", "patch" ]
[ "public", "boolean", "is", "descendant", "(", "string", "child", "relative", "path", ")", "throws", "i", "o", "exception", "{", "return", "false", ";", "}" ]
[ "browser", "page", "performance", "related", "source" ]
[ "browser", "app", "page", "perf", "to", "browser", "app", "page", "perf", "(", ")", "{", "browser", "app", "page", "perf", "perf", "=", "new", "browser", "app", "page", "perf", "(", ")", ";", "perf", "set", "name", "(", "pate", "path", ")", ";", "perf", "set", "service", "name", "(", "service", ")", ";", "to", "browser", "app", "perf", "source", "(", "perf", ")", ";", "return", "perf", ";", "}" ]
[ "a", "utility", "function", "that", "does", "the", "following", ":", "1", "find", "new", "shards", "for", "each", "stream", "that", "we", "haven", "'", "t", "seen", "before", "2", "for", "each", "new", "shard", ",", "determine", "whether", "this", "consumer", "subtask", "should", "subscribe", "to", "them", ";", "if", "yes", ",", "it", "is", "added", "to", "the", "returned", "list", "of", "shards", "3", "update", "the", "subscribed", "streams", "to", "last", "discovered", "shard", "ids", "state", "so", "that", "we", "won", "'", "t", "get", "shards", "that", "we", "have", "already", "seen", "before", "the", "next", "time", "this", "function", "is", "called" ]
[ "public", "list", "<", "stream", "shard", "handle", ">", "discover", "new", "shards", "to", "subscribe", "(", ")", "throws", "interrupted", "exception", "{", "list", "<", "stream", "shard", "handle", ">", "new", "shards", "to", "subscribe", "=", "new", "linked", "list", "<", ">", "(", ")", ";", "get", "shard", "list", "result", "shard", "list", "result", "=", "kinesis", "get", "shard", "list", "(", "subscribed", "streams", "to", "last", "discovered", "shard", "ids", ")", ";", "if", "(", "shard", "list", "result", "has", "retrieved", "shards", "(", ")", ")", "{", "set", "<", "string", ">", "streams", "with", "new", "shards", "=", "shard", "list", "result", "get", "streams", "with", "retrieved", "shards", "(", ")", ";", "for", "(", "string", "stream", ":", "streams", "with", "new", "shards", ")", "{", "list", "<", "stream", "shard", "handle", ">", "new", "shards", "of", "stream", "=", "shard", "list", "result", "get", "retrieved", "shard", "list", "of", "stream", "(", "stream", ")", ";", "for", "(", "stream", "shard", "handle", "new", "shard", ":", "new", "shards", "of", "stream", ")", "{", "int", "hash", "code", "=", "shard", "assigner", "assign", "(", "new", "shard", ",", "total", "number", "of", "consumer", "subtasks", ")", ";", "if", "(", "is", "this", "subtask", "should", "subscribe", "to", "(", "hash", "code", ",", "total", "number", "of", "consumer", "subtasks", ",", "index", "of", "this", "consumer", "subtask", ")", ")", "{", "new", "shards", "to", "subscribe", "add", "(", "new", "shard", ")", ";", "}", "}", "advance", "last", "discovered", "shard", "of", "stream", "(", "stream", ",", "shard", "list", "result", "get", "last", "seen", "shard", "of", "stream", "(", "stream", ")", "get", "shard", "(", ")", "get", "shard", "id", "(", ")", ")", ";", "}", "}", "return", "new", "shards", "to", "subscribe", ";", "}" ]
[ "the", "loopback", "ip", "endpoint", "or", "unix", "domain", "socket", "to", "which", "traffic", "should", "be", "forwarded", "to", "by", "default", "format", "should", "be", "`", "127", "0", "0", "1", ":", "port", "`", "or", "`", "unix", ":", "pathtosocket", "`", "or", "`", "unix", ":", "&", "#", "64", ";", "foobar", "`", "(", "linux", "abstract", "namespace", ")", "<", "code", ">", "string", "default", "endpoint", "=", "5", ";", "<", "code", ">" ]
[ "public", "com", "google", "protobuf", "byte", "string", "get", "default", "endpoint", "bytes", "(", ")", "{", "java", "lang", "object", "ref", "=", "default", "endpoint", ";", "if", "(", "ref", "instanceof", "string", ")", "{", "com", "google", "protobuf", "byte", "string", "b", "=", "com", "google", "protobuf", "byte", "string", "copy", "from", "utf", "8", "(", "(", "java", "lang", "string", ")", "ref", ")", ";", "default", "endpoint", "=", "b", ";", "return", "b", ";", "}", "else", "{", "return", "(", "com", "google", "protobuf", "byte", "string", ")", "ref", ";", "}", "}" ]
[ "return", "the", "splits", "to", "assigner", "if", "the", "task", "failed", "to", "process", "it" ]
[ "void", "return", "input", "split", "(", "list", "<", "input", "split", ">", "splits", ",", "int", "task", "id", ")", ";" ]
[ "create", "the", "private", "key" ]
[ "protected", "void", "create", "google", "apps", "private", "key", "(", ")", "throws", "exception", "{", "if", "(", "!", "is", "valid", "configuration", "(", ")", ")", "{", "logger", "debug", "(", "\"", "google", "apps", "private", "key", "bean", "will", "not", "be", "created", ",", "because", "it", "'", "s", "not", "configured", "\"", ")", ";", "return", ";", "}", "val", "bean", "=", "new", "private", "key", "factory", "bean", "(", ")", ";", "if", "(", "this", "private", "key", "location", "starts", "with", "(", "resource", "utils", "classpath", "url", "prefix", ")", ")", "{", "bean", "set", "location", "(", "new", "class", "path", "resource", "(", "string", "utils", "remove", "start", "(", "this", "private", "key", "location", ",", "resource", "utils", "classpath", "url", "prefix", ")", ")", ")", ";", "}", "else", "if", "(", "this", "private", "key", "location", "starts", "with", "(", "resource", "utils", "file", "url", "prefix", ")", ")", "{", "bean", "set", "location", "(", "new", "file", "system", "resource", "(", "string", "utils", "remove", "start", "(", "this", "private", "key", "location", ",", "resource", "utils", "file", "url", "prefix", ")", ")", ")", ";", "}", "else", "{", "bean", "set", "location", "(", "new", "file", "system", "resource", "(", "this", "private", "key", "location", ")", ")", ";", "}", "bean", "set", "algorithm", "(", "this", "key", "algorithm", ")", ";", "logger", "debug", "(", "\"", "loading", "google", "apps", "private", "key", "from", "[", "{", "}", "]", "with", "key", "algorithm", "[", "{", "}", "]", "\"", ",", "bean", "get", "location", "(", ")", ",", "bean", "get", "algorithm", "(", ")", ")", ";", "bean", "after", "properties", "set", "(", ")", ";", "logger", "debug", "(", "\"", "creating", "google", "apps", "private", "key", "instance", "via", "[", "{", "}", "]", "\"", ",", "this", "private", "key", "location", ")", ";", "this", "private", "key", "=", "bean", "get", "object", "(", ")", ";", "}" ]
[ "convert", "open", "a", "p", "i", "parameter", "object", "to", "codegen", "parameter", "object" ]
[ "public", "codegen", "parameter", "from", "parameter", "(", "parameter", "param", ",", "set", "<", "string", ">", "imports", ")", "{", "codegen", "parameter", "p", "=", "super", "from", "parameter", "(", "param", ",", "imports", ")", ";", "if", "(", "p", "is", "container", ")", "{", "/", "/", "array", "or", "map" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "recover", "node", "state", "from", "the", "ordinal", "in", "general", ",", "thrift", "enum", "is", "the", "right", "annotation", "to", "use", "but", "given", "the", "class", "is", "in", "spi", ",", "use", "the", "following", "workaround" ]
[ "public", "static", "node", "state", "value", "of", "(", "int", "value", ")", "{", "for", "(", "node", "state", "node", "state", ":", "values", "(", ")", ")", "{", "if", "(", "node", "state", "get", "value", "(", ")", "=", "=", "value", ")", "{", "return", "node", "state", ";", "}", "}", "throw", "new", "illegal", "argument", "exception", "(", "\"", "invalid", "node", "state", "value", ":", "\"", "+", "value", ")", ";", "}" ]
[ "helper", "method", "to", "configure", "the", "first", "api", "key", "found" ]
[ "public", "api", "client", "set", "api", "key", "(", "string", "api", "key", ")", "{", "for", "(", "interceptor", "api", "authorization", ":", "api", "authorizations", "values", "(", ")", ")", "{", "if", "(", "api", "authorization", "instanceof", "api", "key", "auth", ")", "{", "api", "key", "auth", "key", "auth", "=", "(", "api", "key", "auth", ")", "api", "authorization", ";", "key", "auth", "set", "api", "key", "(", "api", "key", ")", ";", "return", "this", ";", "}", "}", "return", "this", ";", "}" ]
[ "returns", "the", "path", "to", "the", "linker" ]
[ "public", "string", "get", "linker", "path", "string", "(", ")", "{", "return", "feature", "configuration", "get", "tool", "path", "for", "action", "(", "link", "target", "type", "get", "action", "name", "(", ")", ")", ";", "}" ]
[ "compares", "two", "maps", "recursively", ",", "using", "arrays", "comparisons", "for", "byte", "[", "]", "through", "arrays", "equals", "(", "byte", "[", "]", ",", "byte", "[", "]", ")" ]
[ "private", "static", "void", "assert", "map", "equals", "(", "map", "<", "string", ",", "object", ">", "expected", ",", "map", "<", "string", ",", "object", ">", "actual", ")", "{", "assert", "equals", "(", "expected", "size", "(", ")", ",", "actual", "size", "(", ")", ")", ";", "for", "(", "map", "entry", "<", "string", ",", "object", ">", "expected", "entry", ":", "expected", "entry", "set", "(", ")", ")", "{", "string", "expected", "key", "=", "expected", "entry", "get", "key", "(", ")", ";", "object", "expected", "value", "=", "expected", "entry", "get", "value", "(", ")", ";", "if", "(", "expected", "value", "=", "=", "null", ")", "{", "assert", "true", "(", "actual", "get", "(", "expected", "key", ")", "=", "=", "null", "&", "&", "actual", "contains", "key", "(", "expected", "key", ")", ")", ";", "}", "else", "{", "object", "actual", "value", "=", "actual", "get", "(", "expected", "key", ")", ";", "assert", "object", "equals", "(", "expected", "value", ",", "actual", "value", ")", ";", "}", "}", "}" ]
[ "test", "renew", "delegation", "token", "request", "p", "b", "impl", "test", "a", "transformation", "to", "prototype", "and", "back" ]
[ "public", "void", "test", "renew", "delegation", "token", "request", "p", "b", "impl", "(", ")", "{", "token", "token", "=", "get", "delegation", "token", "(", ")", ";", "renew", "delegation", "token", "request", "p", "b", "impl", "original", "=", "new", "renew", "delegation", "token", "request", "p", "b", "impl", "(", ")", ";", "original", "set", "delegation", "token", "(", "token", ")", ";", "renew", "delegation", "token", "request", "proto", "proto", "type", "=", "original", "get", "proto", "(", ")", ";", "renew", "delegation", "token", "request", "p", "b", "impl", "copy", "=", "new", "renew", "delegation", "token", "request", "p", "b", "impl", "(", "proto", "type", ")", ";", "assert", "not", "null", "(", "copy", "get", "delegation", "token", "(", ")", ")", ";", "/", "/", "compare", "source", "and", "converted", "assert", "equals", "(", "token", ",", "copy", "get", "delegation", "token", "(", ")", ")", ";", "}" ]
[ "sets", "the", "promise", "to", "be", "notified", "when", "all", "combined", "futures", "have", "finished", "if", "all", "combined", "futures", "succeed", ",", "then", "the", "aggregate", "promise", "will", "succeed", "if", "one", "or", "more", "combined", "futures", "fails", ",", "then", "the", "aggregate", "promise", "will", "fail", "with", "the", "cause", "of", "one", "of", "the", "failed", "futures", "if", "more", "than", "one", "combined", "future", "fails", ",", "then", "exactly", "which", "failure", "will", "be", "assigned", "to", "the", "aggregate", "promise", "is", "undefined", "after", "this", "method", "is", "called", ",", "no", "more", "futures", "may", "be", "added", "via", "the", "{", "@", "link", "promise", "combiner", "#", "add", "(", "future", ")", "}", "or", "{", "@", "link", "promise", "combiner", "#", "add", "all", "(", "future", "[", "]", ")", "}", "methods" ]
[ "public", "void", "finish", "(", "promise", "<", "void", ">", "aggregate", "promise", ")", "{", "object", "util", "check", "not", "null", "(", "aggregate", "promise", ",", "\"", "aggregate", "promise", "\"", ")", ";", "check", "in", "event", "loop", "(", ")", ";", "if", "(", "this", "aggregate", "promise", "!", "=", "null", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "already", "finished", "\"", ")", ";", "}", "this", "aggregate", "promise", "=", "aggregate", "promise", ";", "if", "(", "done", "count", "=", "=", "expected", "count", ")", "{", "try", "promise", "(", ")", ";", "}", "}" ]
[ "registers", "an", "{", "@", "link", "default", "request", "to", "view", "name", "translator", "}", "under", "a", "well", "-", "known", "name", "unless", "already", "registered" ]
[ "private", "static", "void", "register", "view", "name", "translator", "(", "parser", "context", "context", ",", "@", "nullable", "object", "source", ")", "{", "if", "(", "!", "contains", "bean", "in", "hierarchy", "(", "context", ",", "dispatcher", "servlet", "request", "to", "view", "name", "translator", "bean", "name", ")", ")", "{", "root", "bean", "definition", "bean", "def", "=", "new", "root", "bean", "definition", "(", "default", "request", "to", "view", "name", "translator", "class", ")", ";", "bean", "def", "set", "source", "(", "source", ")", ";", "bean", "def", "set", "role", "(", "bean", "definition", "role", "infrastructure", ")", ";", "context", "get", "registry", "(", ")", "register", "bean", "definition", "(", "dispatcher", "servlet", "request", "to", "view", "name", "translator", "bean", "name", ",", "bean", "def", ")", ";", "context", "register", "component", "(", "new", "bean", "component", "definition", "(", "bean", "def", ",", "dispatcher", "servlet", "request", "to", "view", "name", "translator", "bean", "name", ")", ")", ";", "}", "}" ]
[ "convert", "x", "attrs", "json", "to", "x", "attrs", "map" ]
[ "private", "map", "<", "string", ",", "byte", "[", "]", ">", "create", "x", "attr", "map", "(", "j", "s", "o", "n", "array", "json", "array", ")", "throws", "i", "o", "exception", "{", "map", "<", "string", ",", "byte", "[", "]", ">", "x", "attrs", "=", "maps", "new", "hash", "map", "(", ")", ";", "for", "(", "object", "obj", ":", "json", "array", ")", "{", "j", "s", "o", "n", "object", "json", "obj", "=", "(", "j", "s", "o", "n", "object", ")", "obj", ";", "final", "string", "name", "=", "(", "string", ")", "json", "obj", "get", "(", "xattr", "name", "json", ")", ";", "final", "byte", "[", "]", "value", "=", "x", "attr", "codec", "decode", "value", "(", "(", "string", ")", "json", "obj", "get", "(", "xattr", "value", "json", ")", ")", ";", "x", "attrs", "put", "(", "name", ",", "value", ")", ";", "}", "return", "x", "attrs", ";", "}" ]
[ "subtracts", "decrement", "from", "this", "resource", "counter", "value", "and", "returns", "the", "new", "value" ]
[ "public", "resource", "counter", "subtract", "(", "resource", "counter", "decrement", ")", "{", "return", "internal", "subtract", "(", "decrement", "get", "resources", "with", "count", "(", ")", ")", ";", "}" ]
[ "this", "a", "sanity", "check", "to", "make", "sure", "that", "any", "filesystem", "'", "s", "handling", "of", "renames", "empty", "dirs", "doesn", "'", "t", "cause", "any", "regressions" ]
[ "public", "void", "test", "rename", "empty", "to", "dir", "with", "same", "prefix", "allowed", "(", ")", "throws", "throwable", "{", "assume", "true", "(", "rename", "supported", "(", ")", ")", ";", "path", "parentdir", "=", "path", "(", "\"", "test", "rename", "empty", "to", "dir", "with", "same", "prefix", "allowed", "\"", ")", ";", "fs", "mkdirs", "(", "parentdir", ")", ";", "path", "dest", "=", "path", "(", "\"", "test", "rename", "empty", "to", "dir", "with", "same", "prefix", "allowed", "dest", "\"", ")", ";", "rename", "(", "parentdir", ",", "dest", ",", "true", ",", "false", ",", "true", ")", ";", "}" ]
[ "whether", "the", "execution", "thread", "should", "be", "interrupted", "if", "the", "execution", "observable", "is", "unsubscribed", "or", "the", "future", "is", "cancelled", "via", "{", "@", "link", "future", "#", "cancel", "(", "true", ")", "}", ")", "applicable", "only", "when", "{", "@", "link", "#", "execution", "isolation", "strategy", "(", ")", "}", "=", "=", "thread" ]
[ "public", "hystrix", "property", "<", "boolean", ">", "execution", "isolation", "thread", "interrupt", "on", "future", "cancel", "(", ")", "{", "return", "execution", "isolation", "thread", "interrupt", "on", "future", "cancel", ";", "}" ]
[ "returns", "true", "iff", "the", "-", "-", "check", "tests", "up", "to", "date", "option", "is", "enabled" ]
[ "private", "boolean", "option", "check", "tests", "up", "to", "date", "(", ")", "{", "return", "options", "get", "options", "(", "execution", "options", "class", ")", "test", "check", "up", "to", "date", ";", "}" ]
[ "forward", "the", "time", "by", "the", "given", "duration", "and", "run", "all", "due", "tasks" ]
[ "public", "int", "forward", "time", "(", "long", "value", ",", "time", "unit", "unit", ")", "{", "current", "time", "nanos", "+", "=", "unit", "to", "nanos", "(", "value", ")", ";", "return", "run", "due", "tasks", "(", ")", ";", "}" ]
[ "this", "test", "verifies", "that", "{", "@", "link", "abstract", "parse", "tree", "visitor", "#", "should", "visit", "next", "child", "}", "is", "called", "before", "visiting", "the", "first", "child", "it", "also", "verifies", "that", "{", "@", "link", "abstract", "parse", "tree", "visitor", "#", "default", "result", "}", "provides", "the", "default", "return", "value", "for", "visiting", "a", "tree" ]
[ "public", "void", "test", "should", "not", "visit", "terminal", "(", ")", "{", "string", "input", "=", "\"", "a", "\"", ";", "visitor", "basic", "lexer", "lexer", "=", "new", "visitor", "basic", "lexer", "(", "new", "a", "n", "t", "l", "r", "input", "stream", "(", "input", ")", ")", ";", "visitor", "basic", "parser", "parser", "=", "new", "visitor", "basic", "parser", "(", "new", "common", "token", "stream", "(", "lexer", ")", ")", ";", "visitor", "basic", "parser", "s", "context", "context", "=", "parser", "s", "(", ")", ";", "assert", "assert", "equals", "(", "\"", "(", "s", "a", "<", "eof", ">", ")", "\"", ",", "context", "to", "string", "tree", "(", "parser", ")", ")", ";", "visitor", "basic", "visitor", "<", "string", ">", "listener", "=", "new", "visitor", "basic", "base", "visitor", "<", "string", ">", "(", ")", "{", "@", "override", "public", "string", "visit", "terminal", "(", "terminal", "node", "node", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "should", "not", "be", "reachable", "\"", ")", ";", "}", "@", "override", "protected", "string", "default", "result", "(", ")", "{", "return", "\"", "default", "result", "\"", ";", "}", "@", "override", "protected", "boolean", "should", "visit", "next", "child", "(", "rule", "node", "node", ",", "string", "current", "result", ")", "{", "return", "false", ";", "}", "}", ";", "string", "result", "=", "listener", "visit", "(", "context", ")", ";", "string", "expected", "=", "\"", "default", "result", "\"", ";", "assert", "assert", "equals", "(", "expected", ",", "result", ")", ";", "}" ]