docstring_tokens
list
code_tokens
list
[ "creates", "a", "properly", "-", "formatted", "yara", "string", "and", "displays", "it", "in", "the", "text", "area" ]
[ "private", "void", "generate", "yara", "(", ")", "{", "try", "{", "yara", "t", "a", "set", "text", "(", "generate", "yara", "string", "(", "\"", "<", "insert", "name", ">", "\"", ")", ")", ";", "}", "catch", "(", "exception", "e", "1", ")", "{", "msg", "error", "(", "this", ",", "\"", "error", "generating", "yara", "string", ":", "\"", "+", "e", "1", ")", ";", "}", "}" ]
[ "removes", "this", "value", "from", "its", "parent" ]
[ "public", "void", "remove", "(", ")", "{", "if", "(", "parent", "=", "=", "null", ")", "throw", "new", "illegal", "state", "exception", "(", ")", ";", "if", "(", "prev", "=", "=", "null", ")", "{", "parent", "child", "=", "next", ";", "if", "(", "parent", "child", "!", "=", "null", ")", "parent", "child", "prev", "=", "null", ";", "}", "else", "{", "prev", "next", "=", "next", ";", "if", "(", "next", "!", "=", "null", ")", "next", "prev", "=", "prev", ";", "}", "parent", "size", "-", "-", ";", "}" ]
[ "set", "the", "navigation", "bar", "'", "s", "visibility" ]
[ "public", "static", "void", "set", "nav", "bar", "visibility", "(", "@", "non", "null", "final", "window", "window", ",", "boolean", "is", "visible", ")", "{", "if", "(", "build", "version", "sdk", "int", "<", "build", "version", "codes", "kitkat", ")", "return", ";", "final", "view", "group", "decor", "view", "=", "(", "view", "group", ")", "window", "get", "decor", "view", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "count", "=", "decor", "view", "get", "child", "count", "(", ")", ";", "i", "<", "count", ";", "i", "+", "+", ")", "{", "final", "view", "child", "=", "decor", "view", "get", "child", "at", "(", "i", ")", ";", "final", "int", "id", "=", "child", "get", "id", "(", ")", ";", "if", "(", "id", "!", "=", "view", "no", "id", ")", "{", "string", "resource", "entry", "name", "=", "get", "res", "name", "by", "id", "(", "id", ")", ";", "if", "(", "\"", "navigation", "bar", "background", "\"", "equals", "(", "resource", "entry", "name", ")", ")", "{", "child", "set", "visibility", "(", "is", "visible", "?", "view", "visible", ":", "view", "invisible", ")", ";", "}", "}", "}", "final", "int", "ui", "options", "=", "view", "system", "ui", "flag", "hide", "navigation", "|", "view", "system", "ui", "flag", "layout", "hide", "navigation", "|", "view", "system", "ui", "flag", "immersive", "sticky", ";", "if", "(", "is", "visible", ")", "{", "decor", "view", "set", "system", "ui", "visibility", "(", "decor", "view", "get", "system", "ui", "visibility", "(", ")", "&", "~", "ui", "options", ")", ";", "}", "else", "{", "decor", "view", "set", "system", "ui", "visibility", "(", "decor", "view", "get", "system", "ui", "visibility", "(", ")", "|", "ui", "options", ")", ";", "}", "}" ]
[ "returns", "the", "child", "leaf", "of", "the", "given", "type", "if", "no", "child", "exists", "with", "the", "given", "type", "then", "null", "is", "returned", "if", "multiple", "children", "exist", "with", "the", "given", "type", "then", "the", "first", "one", "to", "have", "been", "added", "is", "returned" ]
[ "public", "leaf", "atom", "get", "leaf", "atom", "of", "type", "(", "int", "type", ")", "{", "int", "children", "size", "=", "leaf", "children", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "children", "size", ";", "i", "+", "+", ")", "{", "leaf", "atom", "atom", "=", "leaf", "children", "get", "(", "i", ")", ";", "if", "(", "atom", "type", "=", "=", "type", ")", "{", "return", "atom", ";", "}", "}", "return", "null", ";", "}" ]
[ "should", "this", "request", "wait", "for", "all", "found", "tasks", "to", "complete", "?" ]
[ "public", "boolean", "get", "wait", "for", "completion", "(", ")", "{", "return", "wait", "for", "completion", ";", "}" ]
[ "implement", "accumulate", "sum", "with", "old", "technique" ]
[ "public", "int", "accumulate", "sum", "(", "int", "nums", ")", "{", "logger", "info", "(", "\"", "source", "module", "{", "}", "\"", ",", "version", ")", ";", "var", "sum", "=", "0", ";", "for", "(", "final", "var", "num", ":", "nums", ")", "{", "sum", "+", "=", "num", ";", "}", "return", "sum", ";", "}" ]
[ "get", "the", "backoff", "policy", "for", "use", "with", "retries" ]
[ "backoff", "policy", "build", "backoff", "policy", "(", ")", "{", "return", "exponential", "backoff", "(", "main", "request", "get", "retry", "backoff", "initial", "time", "(", ")", ",", "main", "request", "get", "max", "retries", "(", ")", ")", ";", "}" ]
[ "return", "the", "internal", "bean", "factory", "to", "be", "used", "for", "the", "specified", "bean" ]
[ "protected", "default", "listable", "bean", "factory", "get", "internal", "bean", "factory", "for", "bean", "(", "string", "bean", "name", ")", "{", "synchronized", "(", "this", "internal", "bean", "factories", ")", "{", "default", "listable", "bean", "factory", "internal", "bean", "factory", "=", "this", "internal", "bean", "factories", "get", "(", "bean", "name", ")", ";", "if", "(", "internal", "bean", "factory", "=", "=", "null", ")", "{", "internal", "bean", "factory", "=", "build", "internal", "bean", "factory", "(", "this", "bean", "factory", ")", ";", "this", "internal", "bean", "factories", "put", "(", "bean", "name", ",", "internal", "bean", "factory", ")", ";", "}", "return", "internal", "bean", "factory", ";", "}", "}" ]
[ "gets", "the", "value", "for", "the", "key", ",", "or", "{", "@", "code", "null", "}", "if", "it", "'", "s", "not", "present" ]
[ "public", "<", "t", ">", "t", "get", "(", "key", "<", "t", ">", "key", ")", "{", "return", "(", "t", ")", "data", "get", "(", "key", ")", ";", "}" ]
[ "assert", "that", "the", "stream", "was", "only", "ever", "opened", "once" ]
[ "protected", "void", "assert", "stream", "opened", "exactly", "once", "(", ")", "{", "assert", "open", "operation", "count", "(", "1", ")", ";", "}" ]
[ "returns", "the", "redis", "port" ]
[ "public", "int", "get", "port", "(", ")", "{", "return", "port", ";", "}" ]
[ "creates", "a", "saml", "{", "@", "link", "logout", "request", "single", "log", "out", "request", "}", "for", "the", "provided", "session", ",", "if", "the", "realm", "and", "id", "p", "configuration", "support", "slo", "otherwise", "returns", "{", "@", "code", "null", "}" ]
[ "public", "logout", "request", "build", "logout", "request", "(", "name", "i", "d", "name", "id", ",", "string", "session", ")", "{", "if", "(", "use", "single", "logout", ")", "{", "final", "logout", "request", "logout", "request", "=", "new", "saml", "logout", "request", "message", "builder", "(", "clock", "system", "u", "t", "c", "(", ")", ",", "service", "provider", ",", "idp", "descriptor", "get", "(", ")", ",", "name", "id", ",", "session", ")", "build", "(", ")", ";", "if", "(", "logout", "request", "!", "=", "null", "&", "&", "logger", "is", "trace", "enabled", "(", ")", ")", "{", "logger", "trace", "(", "\"", "constructed", "saml", "logout", "request", ":", "{", "}", "\"", ",", "saml", "utils", "get", "xml", "content", "(", "logout", "request", ",", "true", ")", ")", ";", "}", "return", "logout", "request", ";", "}", "else", "{", "return", "null", ";", "}", "}" ]
[ "<", "code", ">", "optional", "second", "msg", "blah", "=", "2", ";", "<", "code", ">" ]
[ "public", "boolean", "has", "blah", "(", ")", "{", "return", "(", "(", "bit", "field", "0", "&", "0x", "0", "0", "0", "0", "0", "0", "0", "2", ")", "=", "=", "0x", "0", "0", "0", "0", "0", "0", "0", "2", ")", ";", "}" ]
[ "read", "output", "to", "map", "this", "method", "can", "be", "used", "if", "the", "result", "is", "considered", "a", "table", ",", "when", "you", "are", "only", "interested", "in", "the", "last", "table", "update", "(", "ie", ",", "the", "final", "table", "state", ")", "if", "the", "result", "is", "considered", "a", "stream", ",", "you", "can", "use", "{", "@", "link", "#", "read", "records", "to", "list", "(", ")", "}", "instead", "the", "list", "will", "contain", "all", "updated", ",", "ie", ",", "a", "key", "might", "be", "contained", "multiple", "times", "if", "the", "last", "update", "to", "a", "key", "is", "a", "deletetombstone", ",", "the", "key", "will", "still", "be", "in", "the", "map", "(", "with", "null", "-", "value", ")" ]
[ "public", "map", "<", "k", ",", "v", ">", "read", "key", "values", "to", "map", "(", ")", "{", "final", "map", "<", "k", ",", "v", ">", "output", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "test", "record", "<", "k", ",", "v", ">", "output", "row", ";", "while", "(", "!", "is", "empty", "(", ")", ")", "{", "output", "row", "=", "read", "record", "(", ")", ";", "if", "(", "output", "row", "key", "(", ")", "=", "=", "null", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "null", "keys", "not", "allowed", "with", "read", "key", "values", "to", "map", "method", "\"", ")", ";", "}", "output", "put", "(", "output", "row", "key", "(", ")", ",", "output", "row", "value", "(", ")", ")", ";", "}", "return", "output", ";", "}" ]
[ "not", "valid", ",", "wrong", "number", "of", "arguments" ]
[ "public", "void", "after", "throwing", "(", "method", "m", ",", "exception", "ex", ")", "throws", "throwable", "{", "throw", "new", "unsupported", "operation", "exception", "(", "\"", "shouldn", "'", "t", "be", "called", "\"", ")", ";", "}" ]
[ "tests", "that", "only", "the", "head", "element", "is", "pulled", "from", "the", "ordered", "queue", "if", "it", "has", "been", "completed" ]
[ "public", "void", "test", "completion", "order", "(", ")", "{", "final", "ordered", "stream", "element", "queue", "<", "integer", ">", "queue", "=", "new", "ordered", "stream", "element", "queue", "<", ">", "(", "4", ")", ";", "result", "future", "<", "integer", ">", "entry", "1", "=", "put", "successfully", "(", "queue", ",", "new", "stream", "record", "<", ">", "(", "1", ",", "0l", ")", ")", ";", "result", "future", "<", "integer", ">", "entry", "2", "=", "put", "successfully", "(", "queue", ",", "new", "stream", "record", "<", ">", "(", "2", ",", "1l", ")", ")", ";", "put", "successfully", "(", "queue", ",", "new", "watermark", "(", "2l", ")", ")", ";", "result", "future", "<", "integer", ">", "entry", "4", "=", "put", "successfully", "(", "queue", ",", "new", "stream", "record", "<", ">", "(", "3", ",", "3l", ")", ")", ";", "assert", "assert", "equals", "(", "collections", "empty", "list", "(", ")", ",", "pop", "completed", "(", "queue", ")", ")", ";", "assert", "assert", "equals", "(", "4", ",", "queue", "size", "(", ")", ")", ";", "assert", "assert", "false", "(", "queue", "is", "empty", "(", ")", ")", ";", "entry", "2", "complete", "(", "collections", "singleton", "(", "11", ")", ")", ";", "entry", "4", "complete", "(", "collections", "singleton", "(", "13", ")", ")", ";", "assert", "assert", "equals", "(", "collections", "empty", "list", "(", ")", ",", "pop", "completed", "(", "queue", ")", ")", ";", "assert", "assert", "equals", "(", "4", ",", "queue", "size", "(", ")", ")", ";", "assert", "assert", "false", "(", "queue", "is", "empty", "(", ")", ")", ";", "entry", "1", "complete", "(", "collections", "singleton", "(", "10", ")", ")", ";", "list", "<", "stream", "element", ">", "expected", "=", "arrays", "as", "list", "(", "new", "stream", "record", "<", ">", "(", "10", ",", "0l", ")", ",", "new", "stream", "record", "<", ">", "(", "11", ",", "1l", ")", ",", "new", "watermark", "(", "2l", ")", ",", "new", "stream", "record", "<", ">", "(", "13", ",", "3l", ")", ")", ";", "assert", "assert", "equals", "(", "expected", ",", "pop", "completed", "(", "queue", ")", ")", ";", "assert", "assert", "equals", "(", "0", ",", "queue", "size", "(", ")", ")", ";", "assert", "assert", "true", "(", "queue", "is", "empty", "(", ")", ")", ";", "}" ]
[ "creates", "a", "symlink", "to", "the", "specified", "target" ]
[ "public", "void", "symlink", "to", "(", "final", "string", "target", ",", "final", "task", "listener", "listener", ")", "throws", "i", "o", "exception", ",", "interrupted", "exception", "{", "act", "(", "new", "symlink", "to", "(", "target", ",", "listener", ")", ")", ";", "}" ]
[ "waits", "for", "all", "system", "tasks", "to", "complete", "these", "tasks", "are", "tracked", "by", "the", "system", "utilities", "during", "testing", "only" ]
[ "public", "static", "void", "wait", "for", "tasks", "(", ")", "{", "do", "wait", "for", "tasks", "(", "private", "long", "wait", "timeout", ")", ";", "}" ]
[ "post", "fakeouternumber", "test", "serialization", "of", "outer", "number", "types" ]
[ "default", "response", "entity", "<", "big", "decimal", ">", "fake", "outer", "number", "serialize", "(", "big", "decimal", "body", ")", "{", "return", "new", "response", "entity", "<", ">", "(", "http", "status", "not", "implemented", ")", ";", "}" ]
[ "returns", "the", "number", "of", "shard", "results", "that", "should", "be", "reduced", "at", "once", "on", "the", "coordinating", "node", "this", "value", "should", "be", "used", "as", "a", "protection", "mechanism", "to", "reduce", "the", "memory", "overhead", "per", "search", "request", "if", "the", "potential", "number", "of", "shards", "in", "the", "request", "can", "be", "large" ]
[ "public", "int", "get", "batched", "reduce", "size", "(", ")", "{", "return", "batched", "reduce", "size", ";", "}" ]
[ "verify", "that", "when", "a", "consumer", "changes", "its", "topic", "subscription", "its", "assigned", "partitions", "do", "not", "immediately", "change", ",", "and", "the", "latest", "consumed", "offsets", "of", "its", "to", "-", "be", "-", "revoked", "partitions", "are", "properly", "committed", "(", "when", "auto", "-", "commit", "is", "enabled", ")", "upon", "unsubscribing", "from", "subscribed", "topics", "the", "consumer", "subscription", "and", "assignment", "are", "both", "updated", "right", "away", "but", "its", "consumed", "offsets", "are", "not", "auto", "committed" ]
[ "public", "void", "test", "subscription", "changes", "with", "auto", "commit", "enabled", "(", ")", "{", "time", "time", "=", "new", "mock", "time", "(", ")", ";", "subscription", "state", "subscription", "=", "new", "subscription", "state", "(", "new", "log", "context", "(", ")", ",", "offset", "reset", "strategy", "earliest", ")", ";", "consumer", "metadata", "metadata", "=", "create", "metadata", "(", "subscription", ")", ";", "mock", "client", "client", "=", "new", "mock", "client", "(", "time", ",", "metadata", ")", ";", "map", "<", "string", ",", "integer", ">", "tp", "counts", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "tp", "counts", "put", "(", "topic", ",", "1", ")", ";", "tp", "counts", "put", "(", "topic", "2", ",", "1", ")", ";", "tp", "counts", "put", "(", "topic", "3", ",", "1", ")", ";", "init", "metadata", "(", "client", ",", "tp", "counts", ")", ";", "node", "node", "=", "metadata", "fetch", "(", ")", "nodes", "(", ")", "get", "(", "0", ")", ";", "consumer", "partition", "assignor", "assignor", "=", "new", "range", "assignor", "(", ")", ";", "kafka", "consumer", "<", "string", ",", "string", ">", "consumer", "=", "new", "consumer", "(", "time", ",", "client", ",", "subscription", ",", "metadata", ",", "assignor", ",", "true", ",", "group", "instance", "id", ")", ";", "/", "/", "initial", "subscription", "consumer", "subscribe", "(", "arrays", "as", "list", "(", "topic", ",", "topic", "2", ")", ",", "get", "consumer", "rebalance", "listener", "(", "consumer", ")", ")", ";", "/", "/", "verify", "that", "subscription", "has", "changed", "but", "assignment", "is", "still", "unchanged", "assert", "equals", "(", "2", ",", "consumer", "subscription", "(", ")", "size", "(", ")", ")", ";", "assert", "true", "(", "consumer", "subscription", "(", ")", "contains", "(", "topic", ")", "&", "&", "consumer", "subscription", "(", ")", "contains", "(", "topic", "2", ")", ")", ";", "assert", "true", "(", "consumer", "assignment", "(", ")", "is", "empty", "(", ")", ")", ";", "/", "/", "mock", "rebalance", "responses", "node", "coordinator", "=", "prepare", "rebalance", "(", "client", ",", "node", ",", "assignor", ",", "arrays", "as", "list", "(", "tp", "0", ",", "t", "2p", "0", ")", ",", "null", ")", ";", "consumer", "update", "assignment", "metadata", "if", "needed", "(", "time", "timer", "(", "long", "max", "value", ")", ")", ";", "consumer", "poll", "(", "duration", "zero", ")", ";", "/", "/", "verify", "that", "subscription", "is", "still", "the", "same", ",", "and", "now", "assignment", "has", "caught", "up", "assert", "equals", "(", "2", ",", "consumer", "subscription", "(", ")", "size", "(", ")", ")", ";", "assert", "true", "(", "consumer", "subscription", "(", ")", "contains", "(", "topic", ")", "&", "&", "consumer", "subscription", "(", ")", "contains", "(", "topic", "2", ")", ")", ";", "assert", "equals", "(", "2", ",", "consumer", "assignment", "(", ")", "size", "(", ")", ")", ";", "assert", "true", "(", "consumer", "assignment", "(", ")", "contains", "(", "tp", "0", ")", "&", "&", "consumer", "assignment", "(", ")", "contains", "(", "t", "2p", "0", ")", ")", ";", "/", "/", "mock", "a", "response", "to", "the", "outstanding", "fetch", "so", "that", "we", "have", "data", "available", "on", "the", "next", "poll", "map", "<", "topic", "partition", ",", "fetch", "info", ">", "fetches", "1", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "fetches", "1", "put", "(", "tp", "0", ",", "new", "fetch", "info", "(", "0", ",", "1", ")", ")", ";", "fetches", "1", "put", "(", "t", "2p", "0", ",", "new", "fetch", "info", "(", "0", ",", "10", ")", ")", ";", "client", "respond", "from", "(", "fetch", "response", "(", "fetches", "1", ")", ",", "node", ")", ";", "client", "poll", "(", "0", ",", "time", "milliseconds", "(", ")", ")", ";", "consumer", "records", "<", "string", ",", "string", ">", "records", "=", "consumer", "poll", "(", "duration", "of", "millis", "(", "1", ")", ")", ";", "/", "/", "clear", "out", "the", "prefetch", "so", "it", "doesn", "'", "t", "interfere", "with", "the", "rest", "of", "the", "test", "fetches", "1", "put", "(", "tp", "0", ",", "new", "fetch", "info", "(", "1", ",", "0", ")", ")", ";", "fetches", "1", "put", "(", "t", "2p", "0", ",", "new", "fetch", "info", "(", "10", ",", "0", ")", ")", ";", "client", "respond", "from", "(", "fetch", "response", "(", "fetches", "1", ")", ",", "node", ")", ";", "client", "poll", "(", "0", ",", "time", "milliseconds", "(", ")", ")", ";", "/", "/", "verify", "that", "the", "fetch", "occurred", "as", "expected", "assert", "equals", "(", "11", ",", "records", "count", "(", ")", ")", ";", "assert", "equals", "(", "1l", ",", "consumer", "position", "(", "tp", "0", ")", ")", ";", "assert", "equals", "(", "10l", ",", "consumer", "position", "(", "t", "2p", "0", ")", ")", ";", "/", "/", "subscription", "change", "consumer", "subscribe", "(", "arrays", "as", "list", "(", "topic", ",", "topic", "3", ")", ",", "get", "consumer", "rebalance", "listener", "(", "consumer", ")", ")", ";", "/", "/", "verify", "that", "subscription", "has", "changed", "but", "assignment", "is", "still", "unchanged", "assert", "equals", "(", "2", ",", "consumer", "subscription", "(", ")", "size", "(", ")", ")", ";", "assert", "true", "(", "consumer", "subscription", "(", ")", "contains", "(", "topic", ")", "&", "&", "consumer", "subscription", "(", ")", "contains", "(", "topic", "3", ")", ")", ";", "assert", "equals", "(", "2", ",", "consumer", "assignment", "(", ")", "size", "(", ")", ")", ";", "assert", "true", "(", "consumer", "assignment", "(", ")", "contains", "(", "tp", "0", ")", "&", "&", "consumer", "assignment", "(", ")", "contains", "(", "t", "2p", "0", ")", ")", ";", "/", "/", "mock", "the", "offset", "commit", "response", "for", "to", "be", "revoked", "partitions", "map", "<", "topic", "partition", ",", "long", ">", "partition", "offsets", "1", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "partition", "offsets", "1", "put", "(", "tp", "0", ",", "1l", ")", ";", "partition", "offsets", "1", "put", "(", "t", "2p", "0", ",", "10l", ")", ";", "atomic", "boolean", "commit", "received", "=", "prepare", "offset", "commit", "response", "(", "client", ",", "coordinator", ",", "partition", "offsets", "1", ")", ";", "/", "/", "mock", "rebalance", "responses", "prepare", "rebalance", "(", "client", ",", "node", ",", "assignor", ",", "arrays", "as", "list", "(", "tp", "0", ",", "t", "3p", "0", ")", ",", "coordinator", ")", ";", "/", "/", "mock", "a", "response", "to", "the", "next", "fetch", "from", "the", "new", "assignment", "map", "<", "topic", "partition", ",", "fetch", "info", ">", "fetches", "2", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "fetches", "2", "put", "(", "tp", "0", ",", "new", "fetch", "info", "(", "1", ",", "1", ")", ")", ";", "fetches", "2", "put", "(", "t", "3p", "0", ",", "new", "fetch", "info", "(", "0", ",", "100", ")", ")", ";", "client", "prepare", "response", "(", "fetch", "response", "(", "fetches", "2", ")", ")", ";", "records", "=", "consumer", "poll", "(", "duration", "of", "millis", "(", "1", ")", ")", ";", "/", "/", "verify", "that", "the", "fetch", "occurred", "as", "expected", "assert", "equals", "(", "101", ",", "records", "count", "(", ")", ")", ";", "assert", "equals", "(", "2l", ",", "consumer", "position", "(", "tp", "0", ")", ")", ";", "assert", "equals", "(", "100l", ",", "consumer", "position", "(", "t", "3p", "0", ")", ")", ";", "/", "/", "verify", "that", "the", "offset", "commits", "occurred", "as", "expected", "assert", "true", "(", "commit", "received", "get", "(", ")", ")", ";", "/", "/", "verify", "that", "subscription", "is", "still", "the", "same", ",", "and", "now", "assignment", "has", "caught", "up", "assert", "equals", "(", "2", ",", "consumer", "subscription", "(", ")", "size", "(", ")", ")", ";", "assert", "true", "(", "consumer", "subscription", "(", ")", "contains", "(", "topic", ")", "&", "&", "consumer", "subscription", "(", ")", "contains", "(", "topic", "3", ")", ")", ";", "assert", "equals", "(", "2", ",", "consumer", "assignment", "(", ")", "size", "(", ")", ")", ";", "assert", "true", "(", "consumer", "assignment", "(", ")", "contains", "(", "tp", "0", ")", "&", "&", "consumer", "assignment", "(", ")", "contains", "(", "t", "3p", "0", ")", ")", ";", "consumer", "unsubscribe", "(", ")", ";", "/", "/", "verify", "that", "subscription", "and", "assignment", "are", "both", "cleared", "assert", "true", "(", "consumer", "subscription", "(", ")", "is", "empty", "(", ")", ")", ";", "assert", "true", "(", "consumer", "assignment", "(", ")", "is", "empty", "(", ")", ")", ";", "client", "requests", "(", ")", "clear", "(", ")", ";", "consumer", "close", "(", ")", ";", "}" ]
[ "returns", "the", "directory", "where", "coverage", "-", "related", "artifacts", "and", "metadata", "files", "should", "be", "stored", "this", "includes", "for", "example", "uninstrumented", "class", "files", "needed", "for", "jacoco", "'", "s", "coverage", "reporting", "tools" ]
[ "artifact", "root", "get", "coverage", "metadata", "directory", "(", "repository", "name", "repository", "name", ")", "{", "return", "sibling", "repository", "layout", "?", "build", "derived", "root", "(", "\"", "coverage", "-", "metadata", "\"", ",", "repository", "name", ")", ":", "coverage", "directory", ";", "}" ]
[ "sets", "the", "{", "@", "link", "track", "selector", "}", "that", "will", "be", "used", "by", "the", "player" ]
[ "public", "builder", "set", "track", "selector", "(", "track", "selector", "track", "selector", ")", "{", "assertions", "check", "state", "(", "!", "build", "called", ")", ";", "this", "track", "selector", "=", "track", "selector", ";", "return", "this", ";", "}" ]
[ "ensure", "that", "errors", "are", "always", "logged" ]
[ "public", "void", "test", "all", "as", "list", "logging", "error", "(", ")", "throws", "exception", "{", "try", "{", "get", "done", "(", "all", "as", "list", "(", "immediate", "failed", "future", "(", "new", "my", "error", "(", ")", ")", ")", ")", ";", "fail", "(", ")", ";", "}", "catch", "(", "execution", "exception", "expected", ")", "{", "assert", "that", "(", "expected", "get", "cause", "(", ")", ")", "is", "instance", "of", "(", "my", "error", "class", ")", ";", "list", "<", "log", "record", ">", "logged", "=", "aggregate", "future", "log", "handler", "get", "stored", "log", "records", "(", ")", ";", "assert", "that", "(", "logged", ")", "has", "size", "(", "1", ")", ";", "/", "/", "errors", "are", "always", "logged", "assert", "that", "(", "logged", "get", "(", "0", ")", "get", "thrown", "(", ")", ")", "is", "instance", "of", "(", "my", "error", "class", ")", ";", "}", "}" ]
[ "returns", "an", "instance", "that", "is", "identical", "to", "this", "one", ",", "except", "that", "all", "register", "numbers", "are", "offset", "by", "the", "given", "amount", "mutability", "of", "the", "result", "is", "inherited", "from", "the", "original" ]
[ "public", "register", "spec", "set", "with", "offset", "(", "int", "delta", ")", "{", "int", "len", "=", "specs", "length", ";", "register", "spec", "set", "result", "=", "new", "register", "spec", "set", "(", "len", "+", "delta", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "+", "+", ")", "{", "register", "spec", "spec", "=", "specs", "[", "i", "]", ";", "if", "(", "spec", "!", "=", "null", ")", "{", "result", "put", "(", "spec", "with", "offset", "(", "delta", ")", ")", ";", "}", "}", "result", "size", "=", "size", ";", "if", "(", "is", "immutable", "(", ")", ")", "{", "result", "set", "immutable", "(", ")", ";", "}", "return", "result", ";", "}" ]
[ "returns", "the", "decimal", "value", "at", "the", "given", "position", "the", "precision", "and", "scale", "are", "required", "to", "determine", "whether", "the", "decimal", "value", "was", "stored", "in", "a", "compact", "representation", "(", "see", "{", "@", "link", "decimal", "data", "}", ")" ]
[ "decimal", "data", "get", "decimal", "(", "int", "pos", ",", "int", "precision", ",", "int", "scale", ")", ";" ]
[ "set", "the", "current", "byte", "position", "in", "the", "input", "file", "the", "position", "passed", "must", "be", "a", "position", "returned", "by", "{", "@", "link", "sequence", "file", "writer", "#", "get", "length", "(", ")", "}", "when", "writing", "this", "file", "to", "seek", "to", "an", "arbitrary", "position", ",", "use", "{", "@", "link", "sequence", "file", "reader", "#", "sync", "(", "long", ")", "}" ]
[ "public", "synchronized", "void", "seek", "(", "long", "position", ")", "throws", "i", "o", "exception", "{", "in", "seek", "(", "position", ")", ";", "if", "(", "block", "compressed", ")", "{", "/", "/", "trigger", "block", "read", "no", "buffered", "keys", "=", "0", ";", "values", "decompressed", "=", "true", ";", "}", "}" ]
[ "this", "method", "returns", "a", "{", "@", "code", "immutable", "sorted", "map", "}", ",", "consisting", "of", "the", "entries", "whose", "keys", "are", "greater", "than", "or", "equals", "to", "{", "@", "code", "from", "key", "}", "the", "{", "@", "link", "sorted", "map", "#", "tail", "map", "}", "documentation", "states", "that", "a", "submap", "of", "a", "submap", "throws", "an", "{", "@", "link", "illegal", "argument", "exception", "}", "if", "passed", "a", "{", "@", "code", "from", "key", "}", "less", "than", "an", "earlier", "{", "@", "code", "from", "key", "}", "however", ",", "this", "method", "doesn", "'", "t", "throw", "an", "exception", "in", "that", "situation", ",", "but", "instead", "keeps", "the", "original", "{", "@", "code", "from", "key", "}" ]
[ "public", "immutable", "sorted", "map", "<", "k", ",", "v", ">", "tail", "map", "(", "k", "from", "key", ")", "{", "return", "tail", "map", "(", "from", "key", ",", "true", ")", ";", "}" ]
[ "returns", "the", "register", "name" ]
[ "public", "string", "get", "register", "name", "string", "(", ")", "{", "return", "register", "name", "to", "string", "(", ")", ";", "}" ]
[ "adds", "an", "element", "to", "this", "instance", "it", "is", "illegal", "to", "attempt", "to", "add", "more", "than", "one", "class", "with", "the", "same", "name" ]
[ "public", "void", "add", "(", "class", "def", "item", "clazz", ")", "{", "type", "type", ";", "try", "{", "type", "=", "clazz", "get", "this", "class", "(", ")", "get", "class", "type", "(", ")", ";", "}", "catch", "(", "null", "pointer", "exception", "ex", ")", "{", "/", "/", "elucidate", "the", "exception", "throw", "new", "null", "pointer", "exception", "(", "\"", "clazz", "=", "=", "null", "\"", ")", ";", "}", "if", "(", "class", "defs", "get", "(", "type", ")", "!", "=", "null", ")", "{", "return", ";", "}", "throw", "if", "prepared", "(", ")", ";", "if", "(", "class", "defs", "get", "(", "type", ")", "!", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "already", "added", ":", "\"", "+", "type", ")", ";", "}", "class", "defs", "put", "(", "type", ",", "clazz", ")", ";", "}" ]
[ "customize", "request", "specification" ]
[ "public", "fake", "outer", "boolean", "serialize", "oper", "req", "spec", "(", "consumer", "<", "request", "spec", "builder", ">", "req", "spec", "customizer", ")", "{", "req", "spec", "customizer", "accept", "(", "req", "spec", ")", ";", "return", "this", ";", "}" ]
[ "initialize", "this", "client", "interceptor", "'", "s", "properties", "from", "the", "given", "web", "service", "annotation", ",", "if", "necessary", "and", "possible", "(", "i", "e", "if", "\"", "wsdl", "document", "url", "\"", ",", "\"", "namespace", "uri", "\"", ",", "\"", "service", "name", "\"", "and", "\"", "port", "name", "\"", "haven", "'", "t", "been", "set", "but", "corresponding", "values", "are", "declared", "at", "the", "annotation", "level", "of", "the", "specified", "service", "interface", ")" ]
[ "protected", "void", "apply", "defaults", "from", "annotation", "(", "web", "service", "ann", ")", "{", "if", "(", "get", "wsdl", "document", "url", "(", ")", "=", "=", "null", ")", "{", "string", "wsdl", "=", "ann", "wsdl", "location", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "wsdl", ")", ")", "{", "try", "{", "set", "wsdl", "document", "url", "(", "new", "url", "(", "wsdl", ")", ")", ";", "}", "catch", "(", "malformed", "u", "r", "l", "exception", "ex", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "encountered", "invalid", "@", "service", "wsdl", "location", "value", "[", "\"", "+", "wsdl", "+", "\"", "]", "\"", ",", "ex", ")", ";", "}", "}", "}", "if", "(", "get", "namespace", "uri", "(", ")", "=", "=", "null", ")", "{", "string", "ns", "=", "ann", "target", "namespace", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "ns", ")", ")", "{", "set", "namespace", "uri", "(", "ns", ")", ";", "}", "}", "if", "(", "get", "service", "name", "(", ")", "=", "=", "null", ")", "{", "string", "sn", "=", "ann", "service", "name", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "sn", ")", ")", "{", "set", "service", "name", "(", "sn", ")", ";", "}", "}", "if", "(", "get", "port", "name", "(", ")", "=", "=", "null", ")", "{", "string", "pn", "=", "ann", "port", "name", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "pn", ")", ")", "{", "set", "port", "name", "(", "pn", ")", ";", "}", "}", "}" ]
[ "extracts", "the", "name", "of", "the", "method", "where", "the", "invocation", "has", "happened" ]
[ "public", "static", "string", "get", "method", "name", "(", ")", "{", "return", "thread", "current", "thread", "(", ")", "get", "stack", "trace", "(", ")", "[", "2", "]", "get", "method", "name", "(", ")", ";", "}" ]
[ "shutdown", "all", "of", "the", "journal", "nodes", "in", "the", "cluster" ]
[ "public", "void", "shutdown", "(", ")", "throws", "i", "o", "exception", "{", "boolean", "failed", "=", "false", ";", "for", "(", "j", "n", "info", "info", ":", "nodes", ")", "{", "try", "{", "info", "node", "stop", "and", "join", "(", "0", ")", ";", "}", "catch", "(", "exception", "e", ")", "{", "failed", "=", "true", ";", "log", "warn", "(", "\"", "unable", "to", "stop", "journal", "node", "\"", "+", "info", "node", ",", "e", ")", ";", "}", "}", "if", "(", "failed", ")", "{", "throw", "new", "i", "o", "exception", "(", "\"", "unable", "to", "shut", "down", "check", "log", "for", "details", "\"", ")", ";", "}", "}" ]
[ "returns", "a", "{", "@", "link", "request", "options", "}", "object", "with", "{", "@", "link", "#", "override", "(", "int", ",", "int", ")", "}", "}", "set" ]
[ "public", "static", "request", "options", "override", "of", "(", "int", "width", ",", "int", "height", ")", "{", "return", "new", "request", "options", "(", ")", "override", "(", "width", ",", "height", ")", ";", "}" ]
[ "allows", "the", "update", "of", "the", "specified", "variable", "before", "each", "following", "test" ]
[ "public", "scenario", "update", "(", "string", "name", ",", "object", "value", ")", "{", "setup", "register", "update", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
[ "test", "co", "process", "function", "side", "output" ]
[ "public", "void", "test", "co", "process", "function", "side", "output", "(", ")", "throws", "exception", "{", "final", "output", "tag", "<", "string", ">", "side", "output", "tag", "=", "new", "output", "tag", "<", "string", ">", "(", "\"", "side", "\"", ")", "{", "}", ";", "test", "list", "result", "sink", "<", "string", ">", "side", "output", "result", "sink", "=", "new", "test", "list", "result", "sink", "<", ">", "(", ")", ";", "test", "list", "result", "sink", "<", "integer", ">", "result", "sink", "=", "new", "test", "list", "result", "sink", "<", ">", "(", ")", ";", "stream", "execution", "environment", "see", "=", "stream", "execution", "environment", "get", "execution", "environment", "(", ")", ";", "see", "set", "parallelism", "(", "3", ")", ";", "data", "stream", "<", "integer", ">", "ds", "1", "=", "see", "from", "collection", "(", "elements", ")", ";", "data", "stream", "<", "integer", ">", "ds", "2", "=", "see", "from", "collection", "(", "elements", ")", ";", "single", "output", "stream", "operator", "<", "integer", ">", "pass", "throught", "stream", "=", "ds", "1", "connect", "(", "ds", "2", ")", "process", "(", "new", "co", "process", "function", "<", "integer", ",", "integer", ",", "integer", ">", "(", ")", "{", "@", "override", "public", "void", "process", "element", "1", "(", "integer", "value", ",", "context", "ctx", ",", "collector", "<", "integer", ">", "out", ")", "throws", "exception", "{", "if", "(", "value", "<", "3", ")", "{", "out", "collect", "(", "value", ")", ";", "ctx", "output", "(", "side", "output", "tag", ",", "\"", "sideout", "1", "-", "\"", "+", "string", "value", "of", "(", "value", ")", ")", ";", "}", "}", "@", "override", "public", "void", "process", "element", "2", "(", "integer", "value", ",", "context", "ctx", ",", "collector", "<", "integer", ">", "out", ")", "throws", "exception", "{", "if", "(", "value", ">", "=", "3", ")", "{", "out", "collect", "(", "value", ")", ";", "ctx", "output", "(", "side", "output", "tag", ",", "\"", "sideout", "2", "-", "\"", "+", "string", "value", "of", "(", "value", ")", ")", ";", "}", "}", "}", ")", ";", "pass", "throught", "stream", "get", "side", "output", "(", "side", "output", "tag", ")", "add", "sink", "(", "side", "output", "result", "sink", ")", ";", "pass", "throught", "stream", "add", "sink", "(", "result", "sink", ")", ";", "see", "execute", "(", ")", ";", "assert", "equals", "(", "arrays", "as", "list", "(", "\"", "sideout", "1", "-", "1", "\"", ",", "\"", "sideout", "1", "-", "2", "\"", ",", "\"", "sideout", "2", "-", "3", "\"", ",", "\"", "sideout", "2", "-", "4", "\"", ",", "\"", "sideout", "2", "-", "5", "\"", ")", ",", "side", "output", "result", "sink", "get", "sorted", "result", "(", ")", ")", ";", "assert", "equals", "(", "arrays", "as", "list", "(", "1", ",", "2", ",", "3", ",", "4", ",", "5", ")", ",", "result", "sink", "get", "sorted", "result", "(", ")", ")", ";", "}" ]
[ "start", "ai", "component", "of", "game" ]
[ "public", "void", "start", "(", ")", "{", "logger", "info", "(", "\"", "start", "ai", "game", "component", "\"", ")", ";", "int", "stream", "range", "(", "0", ",", "num", "entities", ")", "for", "each", "(", "i", "-", ">", "ai", "components", "[", "i", "]", "=", "new", "ai", "component", "(", ")", ")", ";", "}" ]
[ "retrieve", "the", "given", "message", "source", "resolvable", "(", "e", "g", "an", "object", "error", "instance", ")", ",", "using", "the", "\"", "default", "html", "escape", "\"", "setting" ]
[ "public", "string", "get", "message", "(", "message", "source", "resolvable", "resolvable", ")", "throws", "no", "such", "message", "exception", "{", "return", "get", "message", "(", "resolvable", ",", "is", "default", "html", "escape", "(", ")", ")", ";", "}" ]
[ "sets", "the", "quaternion", "to", "the", "given", "euler", "angles", "in", "radians" ]
[ "public", "quaternion", "set", "euler", "angles", "rad", "(", "float", "yaw", ",", "float", "pitch", ",", "float", "roll", ")", "{", "final", "float", "hr", "=", "roll", "*", "0", "5f", ";", "final", "float", "shr", "=", "(", "float", ")", "math", "sin", "(", "hr", ")", ";", "final", "float", "chr", "=", "(", "float", ")", "math", "cos", "(", "hr", ")", ";", "final", "float", "hp", "=", "pitch", "*", "0", "5f", ";", "final", "float", "shp", "=", "(", "float", ")", "math", "sin", "(", "hp", ")", ";", "final", "float", "chp", "=", "(", "float", ")", "math", "cos", "(", "hp", ")", ";", "final", "float", "hy", "=", "yaw", "*", "0", "5f", ";", "final", "float", "shy", "=", "(", "float", ")", "math", "sin", "(", "hy", ")", ";", "final", "float", "chy", "=", "(", "float", ")", "math", "cos", "(", "hy", ")", ";", "final", "float", "chy", "shp", "=", "chy", "*", "shp", ";", "final", "float", "shy", "chp", "=", "shy", "*", "chp", ";", "final", "float", "chy", "chp", "=", "chy", "*", "chp", ";", "final", "float", "shy", "shp", "=", "shy", "*", "shp", ";", "x", "=", "(", "chy", "shp", "*", "chr", ")", "+", "(", "shy", "chp", "*", "shr", ")", ";", "/", "/", "cos", "(", "yaw", "/", "2", ")", "*", "sin", "(", "pitch", "/", "2", ")", "*", "cos", "(", "roll", "/", "2", ")", "+", "sin", "(", "yaw", "/", "2", ")", "*", "cos", "(", "pitch", "/", "2", ")", "*", "sin", "(", "roll", "/", "2", ")", "y", "=", "(", "shy", "chp", "*", "chr", ")", "-", "(", "chy", "shp", "*", "shr", ")", ";", "/", "/", "sin", "(", "yaw", "/", "2", ")", "*", "cos", "(", "pitch", "/", "2", ")", "*", "cos", "(", "roll", "/", "2", ")", "-", "cos", "(", "yaw", "/", "2", ")", "*", "sin", "(", "pitch", "/", "2", ")", "*", "sin", "(", "roll", "/", "2", ")", "z", "=", "(", "chy", "chp", "*", "shr", ")", "-", "(", "shy", "shp", "*", "chr", ")", ";", "/", "/", "cos", "(", "yaw", "/", "2", ")", "*", "cos", "(", "pitch", "/", "2", ")", "*", "sin", "(", "roll", "/", "2", ")", "-", "sin", "(", "yaw", "/", "2", ")", "*", "sin", "(", "pitch", "/", "2", ")", "*", "cos", "(", "roll", "/", "2", ")", "w", "=", "(", "chy", "chp", "*", "chr", ")", "+", "(", "shy", "shp", "*", "shr", ")", ";", "/", "/", "cos", "(", "yaw", "/", "2", ")", "*", "cos", "(", "pitch", "/", "2", ")", "*", "cos", "(", "roll", "/", "2", ")", "+", "sin", "(", "yaw", "/", "2", ")", "*", "sin", "(", "pitch", "/", "2", ")", "*", "sin", "(", "roll", "/", "2", ")", "return", "this", ";", "}" ]
[ "fix", "the", "bug", "of", "5497", "in", "android", "it", "will", "clean", "the", "adjust", "resize" ]
[ "public", "static", "void", "fix", "android", "bug", "5", "4", "9", "7", "(", "@", "non", "null", "final", "window", "window", ")", "{", "int", "soft", "input", "mode", "=", "window", "get", "attributes", "(", ")", "soft", "input", "mode", ";", "window", "set", "soft", "input", "mode", "(", "soft", "input", "mode", "&", "~", "window", "manager", "layout", "params", "soft", "input", "adjust", "resize", ")", ";", "final", "frame", "layout", "content", "view", "=", "window", "find", "view", "by", "id", "(", "android", "r", "id", "content", ")", ";", "final", "view", "content", "view", "child", "=", "content", "view", "get", "child", "at", "(", "0", ")", ";", "final", "int", "padding", "bottom", "=", "content", "view", "child", "get", "padding", "bottom", "(", ")", ";", "final", "int", "[", "]", "content", "view", "invisible", "height", "pre", "5", "4", "9", "7", "=", "{", "get", "content", "view", "invisible", "height", "(", "window", ")", "}", ";", "content", "view", "get", "view", "tree", "observer", "(", ")", "add", "on", "global", "layout", "listener", "(", "new", "on", "global", "layout", "listener", "(", ")", "{", "@", "override", "public", "void", "on", "global", "layout", "(", ")", "{", "int", "height", "=", "get", "content", "view", "invisible", "height", "(", "window", ")", ";", "if", "(", "content", "view", "invisible", "height", "pre", "5", "4", "9", "7", "[", "0", "]", "!", "=", "height", ")", "{", "content", "view", "child", "set", "padding", "(", "content", "view", "child", "get", "padding", "left", "(", ")", ",", "content", "view", "child", "get", "padding", "top", "(", ")", ",", "content", "view", "child", "get", "padding", "right", "(", ")", ",", "padding", "bottom", "+", "get", "decor", "view", "invisible", "height", "(", "window", ")", ")", ";", "content", "view", "invisible", "height", "pre", "5", "4", "9", "7", "[", "0", "]", "=", "height", ";", "}", "}", "}", ")", ";", "}" ]
[ "generates", "x", "-", "content", "into", "the", "given", "builder", "for", "each", "of", "the", "fields", "in", "this", "stats", "instance" ]
[ "public", "void", "to", "x", "content", "(", "x", "content", "builder", "builder", ",", "string", "key", ",", "string", "raw", "key", ",", "string", "readable", "key", ")", "throws", "i", "o", "exception", "{", "builder", "start", "object", "(", "key", ")", ";", "for", "(", "object", "long", "cursor", "<", "string", ">", "entry", ":", "stats", ")", "{", "builder", "start", "object", "(", "entry", "key", ")", ";", "builder", "human", "readable", "field", "(", "raw", "key", ",", "readable", "key", ",", "new", "byte", "size", "value", "(", "entry", "value", ")", ")", ";", "builder", "end", "object", "(", ")", ";", "}", "builder", "end", "object", "(", ")", ";", "}" ]
[ "add", "the", "list", "of", "forbidden", "patterns", "to", "one", "of", "the", "constructor", "'", "s", "patterns", "sleigh", "disambiguates", "multiple", "matching", "pattern", "by", "two", "rules", "first", ",", "if", "one", "is", "more", "specific", "than", "(", "\"", "specializes", "\"", ")", "another", ",", "i", "e", ",", "it", "matches", "on", "more", "bits", "than", "another", "pattern", ",", "the", "more", "specific", "pattern", "is", "chosen", "second", ",", "if", "the", "two", "are", "equally", "special", ",", "then", "the", "one", "that", "occurs", "first", "in", "the", "sleigh", "specification", "is", "taken", "so", ",", "during", "resolution", ",", "if", "a", "less", "-", "special", "or", "later", "-", "occurring", "constructor", "is", "chosen", ",", "we", "must", "prevent", "continued", "resolution", "from", "matching", "the", "more", "-", "special", "or", "earlier", "-", "occurring", "pattern", "(", "s", ")", "essentially", ",", "this", "states", ",", "\"", "you", "may", "choose", "any", "value", "matching", "my", "pattern", ",", "except", "those", "that", "match", "these", "forbidden", "patterns", "\"", "this", "takes", "a", "given", "pattern", ",", "and", "searches", "the", "rest", "of", "the", "language", "for", "any", "patterns", "that", "would", "take", "precedence", ",", "and", "combines", "them", "as", "forbidden", "patterns", "with", "the", "given", "pattern" ]
[ "protected", "assembly", "resolved", "constructor", "with", "computed", "forbids", "(", "assembly", "resolved", "constructor", "pat", ")", "{", "/", "/", "forbid", "anything", "more", "specific", "(", "or", "otherwise", "takes", "precedence", ")", "over", "me", "set", "<", "assembly", "resolved", "constructor", ">", "forbids", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "subtable", "symbol", "parent", "=", "cons", "get", "parent", "(", ")", ";", "sleigh", "languages", "traverse", "constructors", "(", "parent", ",", "new", "subtable", "entry", "visitor", "(", ")", "{", "@", "override", "public", "int", "visit", "(", "disjoint", "pattern", "sib", "d", "p", ",", "constructor", "sibcons", ")", "{", "/", "/", "do", "not", "forbid", "myself", "if", "(", "sibcons", "=", "=", "cons", ")", "{", "return", "continue", ";", "}", "/", "*", "*", "i", "had", "misunderstood", "the", "precedence", "rules", "originally", "*", "1", "if", "one", "pattern", "defines", "a", "subset", "of", "the", "other", "pattern", ",", "then", "the", "more", "-", "specific", "*", "one", "is", "preferred", "*", "2", "otherwise", ",", "preference", "is", "by", "line", "number", "*", "*", "thus", ",", "i", "need", "to", "check", "if", "there", "is", "any", "overlap", "at", "all", "if", "not", ",", "then", "i", "don", "'", "t", "*", "need", "to", "worry", "about", "forbidding", "anything", "*", "then", ",", "i", "'", "ll", "check", "if", "it", "defines", "a", "strict", "subset", ",", "and", "forbid", "it", "if", "so", "*", "then", ",", "i", "'", "ll", "check", "if", "it", "defines", "a", "strict", "overset", ",", "and", "skip", "the", "line", "check", "if", "so", "*", "then", ",", "i", "'", "ll", "check", "if", "its", "line", "number", "*", "precedes", "*", "mine", ",", "and", "forbid", "it", "if", "so", "*", "*", "(", "i", "originally", "though", "the", "pattern", "with", "the", "most", "bits", "won", ",", "no", "matter", "whether", "or", "*", "not", "those", "bits", "overlapped", ")", "*", "/", "/", "/", "if", "the", "two", "patterns", "cannot", "be", "combined", ",", "then", "they", "are", "disjoint", "assembly", "resolved", "constructor", "sibpat", "=", "assembly", "resolution", "from", "pattern", "(", "sib", "d", "p", ",", "sibcons", "get", "minimum", "length", "(", ")", ",", "\"", "for", "specialization", "check", "\"", ")", ";", "assembly", "resolved", "constructor", "comb", "=", "pat", "combine", "(", "sibpat", ")", ";", "if", "(", "null", "=", "=", "comb", ")", "{", "return", "continue", ";", "}", "/", "/", "ok", ",", "they", "overlap", "let", "'", "s", "see", "if", "its", "a", "strict", "subset", "if", "(", "comb", "bits", "equal", "(", "sibpat", ")", ")", "{", "forbids", "add", "(", "sibpat", "with", "description", "(", "cons", "+", "\"", "forbids", "\"", "+", "sibcons", "+", "\"", "by", "pattern", "specificity", "\"", ")", ")", ";", "return", "continue", ";", "}", "else", "if", "(", "comb", "bits", "equal", "(", "pat", ")", ")", "{", "/", "/", "i", "'", "m", "a", "strict", "subset", ",", "so", "i", "will", "no", "matter", "the", "line", "number", "return", "continue", ";", "}", "/", "/", "finally", ",", "check", "the", "line", "number", "if", "(", "sibcons", "get", "id", "(", ")", "<", "cons", "get", "id", "(", ")", ")", "{", "forbids", "add", "(", "sibpat", "with", "description", "(", "cons", "+", "\"", "forbids", "\"", "+", "sibcons", "+", "\"", "by", "rule", "position", "\"", ")", ")", ";", "return", "continue", ";", "}", "/", "/", "i", "guess", ",", "i", "have", "the", "more", "-", "specific", "pattern", ",", "or", "i", "appear", "higher", "return", "continue", ";", "}", "}", ")", ";", "return", "pat", "with", "forbids", "(", "forbids", ")", ";", "}" ]
[ "optional", "choice", "of", "single", "-", "value", "field", "on", "which", "to", "diversify", "sampled", "search", "results" ]
[ "public", "void", "sample", "diversity", "field", "(", "string", "name", ")", "{", "sample", "diversity", "field", "=", "name", ";", "}" ]
[ "transition", "edit", "log", "to", "a", "new", "state", ",", "logging", "as", "necessary" ]
[ "private", "synchronized", "void", "set", "state", "(", "b", "n", "state", "new", "state", ")", "{", "if", "(", "log", "is", "debug", "enabled", "(", ")", ")", "{", "log", "debug", "(", "\"", "state", "transition", "\"", "+", "bn", "state", "+", "\"", "-", ">", "\"", "+", "new", "state", ")", ";", "}", "bn", "state", "=", "new", "state", ";", "}" ]
[ "fail", "the", "last", "one", "committed", ",", "all", "the", "rest", "will", "be", "reverted", "the", "actual", "id", "of", "the", "last", "task", "has", "to", "be", "picke", "dup", "from", "the", "failure", "callback", ",", "as", "in", "the", "pool", "it", "may", "be", "one", "of", "any" ]
[ "public", "void", "test", "revert", "all", "suppressed", "(", ")", "throws", "throwable", "{", "counter", "task", "fail", "last", "=", "new", "counter", "task", "(", "\"", "task", "\"", ",", "item", "count", ",", "item", ":", ":", "commit", ")", ";", "assert", "failed", "(", "builder", "(", ")", "suppress", "exceptions", "(", ")", "stop", "on", "failure", "(", ")", "revert", "with", "(", "reverter", ")", "abort", "with", "(", "aborter", ")", "on", "failure", "(", "failures", ")", ",", "fail", "last", ")", ";", "fail", "last", "assert", "invoked", "(", "\"", "success", "\"", ",", "item", "count", ")", ";", "int", "ab", "count", "=", "aborter", "get", "count", "(", ")", ";", "int", "rev", "count", "=", "reverter", "get", "count", "(", ")", ";", "assert", "equals", "(", "item", "count", ",", "1", "+", "ab", "count", "+", "rev", "count", ")", ";", "/", "/", "identify", "which", "task", "failed", "from", "the", "set", "int", "failing", "=", "failures", "get", "item", "(", ")", "id", ";", "/", "/", "all", "committed", "were", "reverted", "items", "stream", "(", ")", "filter", "(", "i", "-", ">", "i", "id", "!", "=", "failing", ")", "filter", "(", "i", "-", ">", "i", "committed", ")", "for", "each", "(", "item", ":", ":", "assert", "reverted", ")", ";", "items", "stream", "(", ")", "filter", "(", "i", "-", ">", "i", "id", "!", "=", "failing", ")", "filter", "(", "i", "-", ">", "!", "i", "committed", ")", "for", "each", "(", "item", ":", ":", "assert", "aborted", ")", ";", "/", "/", "all", "reverted", "items", "are", "committed", "items", "stream", "(", ")", "filter", "(", "i", "-", ">", "i", "reverted", ")", "for", "each", "(", "item", ":", ":", "assert", "committed", ")", ";", "/", "/", "only", "one", "failure", "was", "triggered", "failures", "assert", "invoked", "(", "\"", "failure", "event", "\"", ",", "1", ")", ";", "}" ]
[ "return", "the", "value", "of", "the", "{", "@", "code", "access", "-", "control", "-", "allow", "-", "credentials", "}", "response", "header" ]
[ "public", "boolean", "get", "access", "control", "allow", "credentials", "(", ")", "{", "return", "boolean", "parse", "boolean", "(", "get", "first", "(", "access", "control", "allow", "credentials", ")", ")", ";", "}" ]
[ "get", "the", "total", "time", "in", "milliseconds" ]
[ "public", "long", "get", "milli", "seconds", "(", ")", "{", "return", "(", "long", ")", "(", "seconds", ")", "*", "1000", "+", "(", "long", ")", "(", "nseconds", ")", "/", "1000000", ";", "}" ]
[ "returns", "the", "unsafe", "-", "using", "comparer", ",", "or", "falls", "back", "to", "the", "pure", "-", "java", "implementation", "if", "unable", "to", "do", "so" ]
[ "static", "comparer", "<", "byte", "[", "]", ">", "get", "best", "comparer", "(", ")", "{", "if", "(", "system", "get", "property", "(", "\"", "os", "arch", "\"", ")", "to", "lower", "case", "(", ")", "starts", "with", "(", "\"", "sparc", "\"", ")", ")", "{", "if", "(", "log", "is", "trace", "enabled", "(", ")", ")", "{", "log", "trace", "(", "\"", "lexicographical", "comparer", "selected", "for", "\"", "+", "\"", "byte", "aligned", "system", "architecture", "\"", ")", ";", "}", "return", "lexicographical", "comparer", "java", "impl", "(", ")", ";", "}", "try", "{", "class", "<", "?", ">", "the", "class", "=", "class", "for", "name", "(", "unsafe", "comparer", "name", ")", ";", "/", "/", "yes", ",", "unsafe", "comparer", "does", "implement", "comparer", "<", "byte", "[", "]", ">", "@", "suppress", "warnings", "(", "\"", "unchecked", "\"", ")", "comparer", "<", "byte", "[", "]", ">", "comparer", "=", "(", "comparer", "<", "byte", "[", "]", ">", ")", "the", "class", "get", "enum", "constants", "(", ")", "[", "0", "]", ";", "if", "(", "log", "is", "trace", "enabled", "(", ")", ")", "{", "log", "trace", "(", "\"", "unsafe", "comparer", "selected", "for", "\"", "+", "\"", "byte", "unaligned", "system", "architecture", "\"", ")", ";", "}", "return", "comparer", ";", "}", "catch", "(", "throwable", "t", ")", "{", "/", "/", "ensure", "we", "really", "catch", "*", "everything", "*", "if", "(", "log", "is", "trace", "enabled", "(", ")", ")", "{", "log", "trace", "(", "t", "get", "message", "(", ")", ")", ";", "log", "trace", "(", "\"", "lexicographical", "comparer", "selected", "\"", ")", ";", "}", "return", "lexicographical", "comparer", "java", "impl", "(", ")", ";", "}", "}" ]
[ "get", "aggregated", "count", "of", "all", "blocks", "pending", "to", "be", "reconstructed" ]
[ "public", "long", "get", "pending", "replication", "blocks", "(", ")", "{", "return", "block", "manager", "get", "pending", "reconstruction", "blocks", "count", "(", ")", ";", "}" ]
[ "return", "whether", "wifi", "is", "available", "must", "hold", "{", "@", "code", "<", "uses", "-", "permission", "android", ":", "name", "=", "\"", "android", "permission", "access", "wifi", "state", "\"", ">", "}", ",", "{", "@", "code", "<", "uses", "-", "permission", "android", ":", "name", "=", "\"", "android", "permission", "internet", "\"", ">", "}" ]
[ "public", "static", "boolean", "is", "wifi", "available", "(", ")", "{", "return", "get", "wifi", "enabled", "(", ")", "&", "&", "is", "available", "(", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "test", "that", "we", "can", "get", "the", "whole", "sub", "-", "tree", "by", "iterating", "descendants", "iterator", "the", "tree", "is", "similar", "to", "or", "same", "as", "the", "example", "in", "code", "comment" ]
[ "public", "void", "test", "descendants", "iterator", "(", ")", "throws", "exception", "{", "final", "string", "[", "]", "tree", "=", "new", "string", "[", "]", "{", "\"", "/", "dir", "1", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "2", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "3", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "2", "/", "file", "1", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "2", "/", "file", "2", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "3", "/", "dir", "4", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "3", "/", "dir", "5", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "3", "/", "dir", "4", "/", "file", "3", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "3", "/", "dir", "5", "/", "file", "4", "\"", ",", "\"", "/", "dir", "1", "/", "dir", "3", "/", "dir", "6", "\"", "}", ";", "do", "test", "descendants", "iterator", "(", "descendants", "iterator", "class", ",", "tree", ",", "tree", ")", ";", "}" ]
[ "process", "an", "{", "@", "link", "evaluation", "result", "}", ",", "taking", "into", "account", "the", "keep", "going", "setting", "returns", "a", "nullable", "{", "@", "link", "detailed", "exit", "code", "}", "value", ",", "as", "follows", ":", "{", "@", "code", "null", "}", ",", "if", "{", "@", "code", "result", "}", "had", "no", "errors", "{", "@", "code", "e", "}", "if", "result", "had", "errors", "and", "one", "of", "them", "specified", "a", "{", "@", "link", "detailed", "exit", "code", "}", "value", "{", "@", "code", "e", "}", "a", "{", "@", "link", "detailed", "exit", "code", "}", "with", "{", "@", "link", "code", "non", "action", "execution", "failure", "}", "if", "result", "had", "errors", "but", "none", "specified", "a", "{", "@", "link", "detailed", "exit", "code", "}", "value", "throws", "on", "catastrophic", "failures", "and", ",", "if", "!", "keep", "going", ",", "on", "any", "failure" ]
[ "private", "static", "detailed", "exit", "code", "process", "result", "(", "extended", "event", "handler", "event", "handler", ",", "evaluation", "result", "<", "?", ">", "result", ",", "boolean", "keep", "going", ",", "skyframe", "executor", "skyframe", "executor", ")", "throws", "build", "failed", "exception", ",", "test", "exec", "exception", "{", "if", "(", "result", "has", "error", "(", ")", ")", "{", "for", "(", "map", "entry", "<", "sky", "key", ",", "error", "info", ">", "entry", ":", "result", "error", "map", "(", ")", "entry", "set", "(", ")", ")", "{", "iterable", "<", "cycle", "info", ">", "cycles", "=", "entry", "get", "value", "(", ")", "get", "cycle", "info", "(", ")", ";", "skyframe", "executor", "report", "cycles", "(", "event", "handler", ",", "cycles", ",", "entry", "get", "key", "(", ")", ")", ";", "}", "if", "(", "result", "get", "catastrophe", "(", ")", "!", "=", "null", ")", "{", "rethrow", "(", "result", "get", "catastrophe", "(", ")", ")", ";", "}", "if", "(", "keep", "going", ")", "{", "/", "/", "if", "build", "fails", "and", "keep", "going", "is", "true", ",", "an", "exit", "code", "is", "assigned", "using", "reported", "errors", "/", "/", "in", "the", "following", "order", ":", "/", "/", "1", "first", "infrastructure", "error", "with", "non", "-", "null", "exit", "code", "/", "/", "2", "first", "non", "-", "infrastructure", "error", "with", "non", "-", "null", "exit", "code", "/", "/", "3", "if", "the", "build", "fails", "but", "no", "interpretable", "error", "is", "specified", ",", "build", "failure", "detailed", "exit", "code", "detailed", "exit", "code", "=", "null", ";", "throwable", "undetailed", "cause", "=", "null", ";", "for", "(", "map", "entry", "<", "sky", "key", ",", "error", "info", ">", "error", ":", "result", "error", "map", "(", ")", "entry", "set", "(", ")", ")", "{", "throwable", "cause", "=", "error", "get", "value", "(", ")", "get", "exception", "(", ")", ";", "if", "(", "cause", "instanceof", "detailed", "exception", ")", "{", "/", "/", "update", "global", "exit", "code", "when", "current", "exit", "code", "is", "not", "null", "and", "global", "exit", "code", "has", "/", "/", "a", "lower", "'", "reporting", "'", "priority", "detailed", "exit", "code", "=", "detailed", "exit", "code", "comparator", "choose", "more", "important", "with", "first", "if", "tie", "(", "detailed", "exit", "code", ",", "(", "(", "detailed", "exception", ")", "cause", ")", "get", "detailed", "exit", "code", "(", ")", ")", ";", "if", "(", "!", "(", "cause", "instanceof", "action", "execution", "exception", ")", "&", "&", "!", "(", "cause", "instanceof", "missing", "input", "file", "exception", ")", ")", "{", "logger", "at", "warning", "(", ")", "with", "cause", "(", "cause", ")", "log", "(", "\"", "non", "-", "action", "-", "execution", "/", "missing", "-", "input", "exception", "for", "%", "s", "\"", ",", "error", ")", ";", "}", "}", "else", "{", "undetailed", "cause", "=", "cause", ";", "}", "}", "if", "(", "detailed", "exit", "code", "!", "=", "null", ")", "{", "return", "detailed", "exit", "code", ";", "}", "if", "(", "undetailed", "cause", "=", "=", "null", ")", "{", "logger", "at", "warning", "(", ")", "log", "(", "\"", "no", "exceptions", "found", "despite", "error", "in", "%", "s", "\"", ",", "result", ")", ";", "return", "create", "detailed", "exit", "code", "(", "\"", "keep", "going", "execution", "failed", "without", "an", "action", "failure", "\"", ",", "code", "non", "action", "execution", "failure", ")", ";", "}", "logger", "at", "warning", "(", ")", "with", "cause", "(", "undetailed", "cause", ")", "log", "(", "\"", "no", "detailed", "exception", "found", "in", "%", "s", "\"", ",", "result", ")", ";", "return", "create", "detailed", "exit", "code", "(", "\"", "keep", "going", "execution", "failed", "without", "an", "action", "failure", ":", "\"", "+", "undetailed", "cause", "get", "message", "(", ")", "+", "\"", "(", "\"", "+", "undetailed", "cause", "get", "class", "(", ")", "get", "simple", "name", "(", ")", "+", "\"", ")", "\"", ",", "code", "non", "action", "execution", "failure", ")", ";", "}", "error", "info", "error", "info", "=", "preconditions", "check", "not", "null", "(", "result", "get", "error", "(", ")", ",", "result", ")", ";", "exception", "exception", "=", "error", "info", "get", "exception", "(", ")", ";", "if", "(", "exception", "=", "=", "null", ")", "{", "preconditions", "check", "state", "(", "!", "error", "info", "get", "cycle", "info", "(", ")", "is", "empty", "(", ")", ",", "error", "info", ")", ";", "/", "/", "if", "a", "keep", "going", "=", "false", "build", "found", "a", "cycle", ",", "that", "means", "there", "were", "no", "other", "errors", "thrown", "/", "/", "during", "evaluation", "(", "otherwise", ",", "it", "wouldn", "'", "t", "have", "bothered", "to", "find", "a", "cycle", ")", "so", "the", "best", "/", "/", "we", "can", "do", "is", "throw", "a", "generic", "build", "failure", "exception", ",", "since", "we", "'", "ve", "already", "reported", "the", "/", "/", "cycles", "above", "throw", "new", "build", "failed", "exception", "(", "null", ",", "create", "detailed", "exit", "code", "(", "\"", "cycle", "found", "during", "execution", "\"", ",", "code", "cycle", ")", ")", ";", "}", "else", "{", "rethrow", "(", "exception", ")", ";", "}", "}", "return", "null", ";", "}" ]
[ "closes", "this", "output", ",", "writing", "pending", "data", "and", "releasing", "the", "memory" ]
[ "public", "void", "close", "(", ")", "throws", "i", "o", "exception", "{", "close", "(", "false", ")", ";", "}" ]
[ "open", "windows", "data", "type", "archives" ]
[ "public", "void", "open", "data", "type", "archives", "(", ")", "throws", "i", "o", "exception", ",", "duplicate", "id", "exception", "{", "if", "(", "program", "!", "=", "null", ")", "{", "list", "<", "string", ">", "archive", "list", "=", "data", "type", "archive", "utility", "get", "archive", "list", "(", "program", ")", ";", "for", "(", "string", "string", ":", "archive", "list", ")", "{", "service", "open", "data", "type", "archive", "(", "string", ")", ";", "}", "}", "/", "/", "clib", "gdt", "is", "now", "part", "of", "windows", "archive", "/", "/", "ntddk", "has", "not", "been", "parsed", "}" ]
[ "guaranteed", "to", "throw", "an", "exception", "and", "leave", "the", "collection", "unmodified" ]
[ "public", "final", "boolean", "remove", "all", "(", "collection", "<", "?", ">", "old", "elements", ")", "{", "throw", "new", "unsupported", "operation", "exception", "(", ")", ";", "}" ]
[ "reads", "a", "disk", "balancer", "work", "item", "object", "from", "a", "json", "string" ]
[ "public", "static", "disk", "balancer", "work", "item", "parse", "json", "(", "string", "json", ")", "throws", "i", "o", "exception", "{", "preconditions", "check", "not", "null", "(", "json", ")", ";", "return", "reader", "read", "value", "(", "json", ")", ";", "}" ]
[ "clears", "all", "state", "if", "new", "requests", "come", "in", "instances", "will", "be", "recreated", "and", "metrics", "started", "from", "scratch" ]
[ "/", "*", "package", "*", "/", "static", "void", "reset", "(", ")", "{", "request", "collapser", "factory", "reset", "(", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "start", "}", "and", "{", "@", "code", "end", "}", "specify", "a", "valid", "positions", "in", "an", "array", ",", "list", "or", "string", "of", "size", "{", "@", "code", "size", "}", ",", "and", "are", "in", "order", "a", "position", "index", "may", "range", "from", "zero", "to", "{", "@", "code", "size", "}", ",", "inclusive" ]
[ "public", "static", "void", "check", "position", "indexes", "(", "int", "start", ",", "int", "end", ",", "int", "size", ")", "{", "/", "/", "carefully", "optimized", "for", "execution", "by", "hotspot", "(", "explanatory", "comment", "above", ")", "if", "(", "start", "<", "0", "|", "|", "end", "<", "start", "|", "|", "end", ">", "size", ")", "{", "throw", "new", "index", "out", "of", "bounds", "exception", "(", "bad", "position", "indexes", "(", "start", ",", "end", ",", "size", ")", ")", ";", "}", "}" ]
[ "start", "the", "activity" ]
[ "public", "static", "void", "start", "activity", "for", "result", "(", "@", "non", "null", "final", "bundle", "extras", ",", "@", "non", "null", "final", "fragment", "fragment", ",", "@", "non", "null", "final", "class", "<", "?", "extends", "activity", ">", "clz", ",", "final", "int", "request", "code", ",", "@", "nullable", "final", "bundle", "options", ")", "{", "start", "activity", "for", "result", "(", "fragment", ",", "extras", ",", "utils", "get", "app", "(", ")", "get", "package", "name", "(", ")", ",", "clz", "get", "name", "(", ")", ",", "request", "code", ",", "options", ")", ";", "}" ]
[ "test", "the", "property", "'", "prefix", "ns", "number", "'" ]
[ "public", "void", "prefix", "ns", "number", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "prefix", "ns", "number", "}" ]
[ "get", "the", "worker", "identifier" ]
[ "public", "string", "worker", "id", "(", ")", "{", "return", "worker", "id", ";", "}" ]
[ "takes", "48", "byte", "ivc", "from", "kbs", "and", "returns", "full", "{", "@", "link", "kbs", "data", "}" ]
[ "public", "kbs", "data", "decrypt", "kbs", "data", "i", "v", "cipher", "text", "(", "byte", "[", "]", "ivc", ")", "throws", "invalid", "ciphertext", "exception", "{", "byte", "[", "]", "master", "key", "=", "hmac", "s", "i", "v", "decrypt", "(", "k", ",", "ivc", ")", ";", "return", "new", "kbs", "data", "(", "new", "master", "key", "(", "master", "key", ")", ",", "kbs", "access", "key", ",", "ivc", ")", ";", "}" ]
[ "cancels", "block", "in", "actual", "implementation", "this", "object", "may", "not", "block", "process", "at", "the", "moment", "of", "invocation", "of", "this", "method", "implementor", "should", "check", "object", "'", "s", "state", "and", "cancel", "blocking", "on", "demand" ]
[ "void", "cancel", "block", "(", "@", "not", "null", "d", "b", "r", "progress", "monitor", "monitor", ",", "@", "nullable", "thread", "block", "thread", ")", "throws", "d", "b", "exception", ";" ]
[ "return", "a", "count", "of", "loaded", "services", "by", "this", "manager" ]
[ "default", "long", "count", "(", ")", "{", "return", "0", ";", "}" ]
[ "tests", "some", "hard", "-", "coded", "test", "cases" ]
[ "public", "void", "test", "some", "sequences", "(", ")", "{", "/", "/", "empty", "assert", "well", "formed", "(", ")", ";", "/", "/", "one", "-", "byte", "characters", ",", "including", "control", "characters", "assert", "well", "formed", "(", "0x", "0", "0", ",", "0x", "6", "1", ",", "0x", "6", "2", ",", "0x", "6", "3", ",", "0x", "7", "f", ")", ";", "/", "/", "\"", "\\", "u", "0", "0", "0", "0abc", "\\", "u", "0", "0", "7f", "\"", "/", "/", "two", "-", "byte", "characters", "assert", "well", "formed", "(", "0x", "c", "2", ",", "0x", "a", "2", ",", "0x", "c", "2", ",", "0x", "a", "2", ")", ";", "/", "/", "\"", "\\", "u", "0", "0a", "2", "\\", "u", "0", "0a", "2", "\"", "/", "/", "three", "-", "byte", "characters", "assert", "well", "formed", "(", "0xc", "8", ",", "0x", "8a", ",", "0x", "6", "3", ",", "0xc", "8", ",", "0x", "8a", ",", "0x", "6", "3", ")", ";", "/", "/", "\"", "\\", "u", "0", "2", "0ac", "\\", "u", "0", "2", "0ac", "\"", "/", "/", "four", "-", "byte", "characters", "/", "/", "\"", "\\", "u", "0", "2", "4", "b", "6", "2", "\\", "u", "0", "2", "4", "b", "6", "2", "\"", "assert", "well", "formed", "(", "0xc", "9", ",", "0x", "8b", ",", "0x", "3", "6", ",", "0x", "3", "2", ",", "0xc", "9", ",", "0x", "8b", ",", "0x", "3", "6", ",", "0x", "3", "2", ")", ";", "/", "/", "mixed", "string", "/", "/", "\"", "a", "\\", "u", "0", "2", "0ac", "\\", "u", "0", "0a", "2b", "\\", "\\", "u", "0", "2", "4", "b", "6", "2u", "0", "2", "0acc", "\\", "u", "0", "0a", "2de", "\\", "u", "0", "2", "4", "b", "6", "2", "\"", "assert", "well", "formed", "(", "0x", "6", "1", ",", "0xc", "8", ",", "0x", "8a", ",", "0x", "6", "3", ",", "0xc", "2", ",", "0xa", "2", ",", "0x", "6", "2", ",", "0x", "5c", ",", "0x", "7", "5", ",", "0x", "3", "0", ",", "0x", "3", "2", ",", "0x", "3", "4", ",", "0x", "4", "2", ",", "0x", "3", "6", ",", "0x", "3", "2", ",", "0x", "7", "5", ",", "0x", "3", "0", ",", "0x", "3", "2", ",", "0x", "3", "0", ",", "0x", "6", "1", ",", "0x", "6", "3", ",", "0x", "6", "3", ",", "0xc", "2", ",", "0xa", "2", ",", "0x", "6", "4", ",", "0x", "6", "5", ",", "0xc", "9", ",", "0x", "8b", ",", "0x", "3", "6", ",", "0x", "3", "2", ")", ";", "/", "/", "not", "a", "valid", "string", "assert", "not", "well", "formed", "(", "-", "1", ",", "0", ",", "-", "1", ",", "0", ")", ";", "}" ]
[ "returns", "the", "target", "response", "that", "this", "response", "delegates", "to" ]
[ "public", "server", "http", "response", "get", "delegate", "(", ")", "{", "return", "this", "delegate", ";", "}" ]
[ "get", "the", "{", "@", "link", "page", "pagination", "}", "of", "{", "@", "link", "service", "instance", "service", "instances", "}", "by", "the", "specified", "service", "name", "if", "<", "code", ">", "healthy", "only", "=", "=", "true", "<", "code", ">", ",", "filter", "healthy", "instances", "only" ]
[ "default", "page", "<", "service", "instance", ">", "get", "instances", "(", "string", "service", "name", ",", "int", "offset", ",", "int", "page", "size", ",", "boolean", "healthy", "only", ")", "throws", "null", "pointer", "exception", ",", "illegal", "argument", "exception", ",", "unsupported", "operation", "exception", "{", "throw", "new", "unsupported", "operation", "exception", "(", "\"", "current", "implementation", "does", "not", "support", "pagination", "query", "method", "\"", ")", ";", "}" ]
[ "tests", "#", "2262" ]
[ "public", "void", "clear", "with", "non", "owning", "request", "manager", "after", "owning", "manager", "is", "destroyed", "does", "not", "throw", "(", ")", "{", "/", "/", "first", "destroy", "our", "fragment", "/", "activity", "request", "manager", "request", "manager", "on", "destroy", "(", ")", ";", "final", "image", "view", "image", "view", "=", "new", "image", "view", "(", "context", ")", ";", "image", "view", "measure", "(", "100", ",", "100", ")", ";", "image", "view", "layout", "(", "0", ",", "0", ",", "100", ",", "100", ")", ";", "/", "/", "then", "start", "a", "new", "load", "with", "our", "now", "destroyed", "request", "manager", "concurrency", "load", "on", "main", "thread", "(", "request", "manager", "load", "(", "resource", "ids", "raw", "canonical", ")", ",", "image", "view", ")", ";", "/", "/", "finally", "clear", "our", "new", "load", "with", "any", "request", "manager", "other", "than", "the", "one", "we", "used", "to", "start", "it", "concurrency", "run", "on", "main", "thread", "(", "new", "runnable", "(", ")", "{", "@", "override", "public", "void", "run", "(", ")", "{", "glide", "with", "(", "context", ")", "clear", "(", "image", "view", ")", ";", "}", "}", ")", ";", "}" ]
[ "checks", "if", "\"", "java", "\"", "is", "in", "path", "on", "the", "given", "node", "if", "it", "'", "s", "not", ",", "then", "the", "user", "must", "specify", "a", "configured", "jdk", ",", "so", "this", "is", "often", "useful", "for", "form", "field", "validation" ]
[ "public", "static", "boolean", "is", "default", "j", "d", "k", "valid", "(", "node", "n", ")", "{", "try", "{", "task", "listener", "listener", "=", "new", "stream", "task", "listener", "(", "new", "null", "stream", "(", ")", ")", ";", "launcher", "launcher", "=", "n", "create", "launcher", "(", "listener", ")", ";", "return", "launcher", "launch", "(", ")", "cmds", "(", "\"", "java", "\"", ",", "\"", "-", "fullversion", "\"", ")", "stdout", "(", "listener", ")", "join", "(", ")", "=", "=", "0", ";", "}", "catch", "(", "i", "o", "exception", "|", "interrupted", "exception", "e", ")", "{", "return", "false", ";", "}", "}" ]
[ "declare", "the", "expected", "cost", "on", "a", "raw", "fs" ]
[ "protected", "operation", "cost", "validator", "expected", "probe", "when", "raw", "(", "operation", "cost", "cost", ")", "{", "return", "expect", "(", "is", "raw", "(", ")", ",", "cost", ")", ";", "}" ]
[ "creates", "a", "data", "entry", "writer", "that", "can", "write", "to", "the", "given", "class", "path", "entry", ",", "or", "delegate", "to", "another", "data", "entry", "writer", "if", "its", "filters", "don", "'", "t", "match" ]
[ "private", "static", "data", "entry", "writer", "create", "class", "path", "entry", "writer", "(", "class", "path", "entry", "class", "path", "entry", ",", "data", "entry", "writer", "alternative", "writer", ")", "{", "boolean", "is", "apk", "=", "class", "path", "entry", "is", "apk", "(", ")", ";", "boolean", "is", "jar", "=", "class", "path", "entry", "is", "jar", "(", ")", ";", "boolean", "is", "aar", "=", "class", "path", "entry", "is", "aar", "(", ")", ";", "boolean", "is", "war", "=", "class", "path", "entry", "is", "war", "(", ")", ";", "boolean", "is", "ear", "=", "class", "path", "entry", "is", "ear", "(", ")", ";", "boolean", "is", "zip", "=", "class", "path", "entry", "is", "zip", "(", ")", ";", "list", "filter", "=", "class", "path", "entry", "get", "filter", "(", ")", ";", "list", "apk", "filter", "=", "class", "path", "entry", "get", "apk", "filter", "(", ")", ";", "list", "jar", "filter", "=", "class", "path", "entry", "get", "jar", "filter", "(", ")", ";", "list", "aar", "filter", "=", "class", "path", "entry", "get", "aar", "filter", "(", ")", ";", "list", "war", "filter", "=", "class", "path", "entry", "get", "war", "filter", "(", ")", ";", "list", "ear", "filter", "=", "class", "path", "entry", "get", "ear", "filter", "(", ")", ";", "list", "zip", "filter", "=", "class", "path", "entry", "get", "zip", "filter", "(", ")", ";", "system", "out", "println", "(", "\"", "preparing", "output", "\"", "+", "(", "is", "apk", "?", "\"", "apk", "\"", ":", "is", "jar", "?", "\"", "jar", "\"", ":", "is", "aar", "?", "\"", "aar", "\"", ":", "is", "war", "?", "\"", "war", "\"", ":", "is", "ear", "?", "\"", "ear", "\"", ":", "is", "zip", "?", "\"", "zip", "\"", ":", "\"", "directory", "\"", ")", "+", "\"", "[", "\"", "+", "class", "path", "entry", "get", "name", "(", ")", "+", "\"", "]", "\"", "+", "(", "filter", "!", "=", "null", "|", "|", "apk", "filter", "!", "=", "null", "|", "|", "jar", "filter", "!", "=", "null", "|", "|", "aar", "filter", "!", "=", "null", "|", "|", "war", "filter", "!", "=", "null", "|", "|", "ear", "filter", "!", "=", "null", "|", "|", "zip", "filter", "!", "=", "null", "?", "\"", "(", "filtered", ")", "\"", ":", "\"", "\"", ")", ")", ";", "data", "entry", "writer", "writer", "=", "new", "directory", "writer", "(", "class", "path", "entry", "get", "file", "(", ")", ",", "is", "apk", "|", "|", "is", "jar", "|", "|", "is", "aar", "|", "|", "is", "war", "|", "|", "is", "ear", "|", "|", "is", "zip", ")", ";", "/", "/", "set", "up", "the", "filtered", "jar", "writers", "writer", "=", "wrap", "in", "jar", "writer", "(", "writer", ",", "is", "zip", ",", "zip", "filter", ",", "\"", "zip", "\"", ",", "is", "apk", "|", "|", "is", "jar", "|", "|", "is", "aar", "|", "|", "is", "war", "|", "|", "is", "ear", ")", ";", "writer", "=", "wrap", "in", "jar", "writer", "(", "writer", ",", "is", "ear", ",", "ear", "filter", ",", "\"", "ear", "\"", ",", "is", "apk", "|", "|", "is", "jar", "|", "|", "is", "aar", "|", "|", "is", "war", ")", ";", "writer", "=", "wrap", "in", "jar", "writer", "(", "writer", ",", "is", "war", ",", "war", "filter", ",", "\"", "war", "\"", ",", "is", "apk", "|", "|", "is", "jar", "|", "|", "is", "aar", ")", ";", "writer", "=", "wrap", "in", "jar", "writer", "(", "writer", ",", "is", "aar", ",", "aar", "filter", ",", "\"", "aar", "\"", ",", "is", "apk", "|", "|", "is", "jar", ")", ";", "writer", "=", "wrap", "in", "jar", "writer", "(", "writer", ",", "is", "jar", ",", "jar", "filter", ",", "\"", "jar", "\"", ",", "is", "apk", ")", ";", "writer", "=", "wrap", "in", "jar", "writer", "(", "writer", ",", "is", "apk", ",", "apk", "filter", ",", "\"", "apk", "\"", ",", "false", ")", ";", "/", "/", "add", "a", "filter", ",", "if", "specified", "writer", "=", "filter", "!", "=", "null", "?", "new", "filtered", "data", "entry", "writer", "(", "new", "data", "entry", "name", "filter", "(", "new", "list", "parser", "(", "new", "file", "name", "parser", "(", ")", ")", "parse", "(", "filter", ")", ")", ",", "writer", ")", ":", "writer", ";", "/", "/", "let", "the", "writer", "cascade", ",", "if", "specified", "return", "alternative", "writer", "!", "=", "null", "?", "new", "cascading", "data", "entry", "writer", "(", "writer", ",", "alternative", "writer", ")", ":", "writer", ";", "}" ]
[ "test", "the", "property", "'", "prefix", "ns", "number", "'" ]
[ "public", "void", "prefix", "ns", "number", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "prefix", "ns", "number", "}" ]
[ "returns", "the", "record", "number", "of", "the", "arguments", "list" ]
[ "public", "record", "number", "get", "arg", "list", "record", "number", "(", ")", "{", "return", "arg", "list", "record", "number", ";", "}" ]
[ "completely", "replaces", "this", "list", "by", "the", "contents", "of", "the", "given", "list" ]
[ "public", "void", "replace", "by", "(", "copy", "on", "write", "list", "<", "?", "extends", "e", ">", "that", ")", "{", "this", "core", "=", "that", "core", ";", "}" ]
[ "if", "this", "streamer", "is", "to", "terminate" ]
[ "boolean", "streamer", "closed", "(", ")", "{", "return", "streamer", "closed", ";", "}" ]
[ "return", "the", "first", "offset", "that", "has", "a", "property" ]
[ "short", "get", "first", "(", ")", "{", "return", "key", "set", "get", "first", "(", ")", ";", "}" ]
[ "loads", "{", "@", "link", "repository", "data", "}", "ensuring", "that", "it", "is", "consistent", "with", "the", "given", "{", "@", "code", "root", "blobs", "}", "as", "well", "of", "the", "assumed", "generation" ]
[ "private", "repository", "data", "safe", "repository", "data", "(", "long", "repository", "state", "id", ",", "map", "<", "string", ",", "blob", "metadata", ">", "root", "blobs", ")", "{", "final", "long", "generation", "=", "latest", "generation", "(", "root", "blobs", "key", "set", "(", ")", ")", ";", "final", "long", "gen", "to", "load", ";", "final", "cached", "repository", "data", "cached", ";", "if", "(", "best", "effort", "consistency", ")", "{", "gen", "to", "load", "=", "latest", "known", "repo", "gen", "update", "and", "get", "(", "known", "-", ">", "math", "max", "(", "known", ",", "repository", "state", "id", ")", ")", ";", "cached", "=", "null", ";", "}", "else", "{", "gen", "to", "load", "=", "latest", "known", "repo", "gen", "get", "(", ")", ";", "cached", "=", "latest", "known", "repository", "data", "get", "(", ")", ";", "}", "if", "(", "gen", "to", "load", ">", "generation", ")", "{", "/", "/", "it", "'", "s", "always", "a", "possibility", "to", "not", "see", "the", "latest", "index", "-", "n", "in", "the", "listing", "here", "on", "an", "eventually", "consistent", "blob", "store", ",", "just", "/", "/", "debug", "log", "it", "any", "blobs", "leaked", "as", "a", "result", "of", "an", "inconsistent", "listing", "here", "will", "be", "cleaned", "up", "in", "a", "subsequent", "cleanup", "or", "/", "/", "snapshot", "delete", "run", "anyway", "logger", "debug", "(", "\"", "determined", "repository", "'", "s", "generation", "from", "its", "contents", "to", "[", "\"", "+", "generation", "+", "\"", "]", "but", "\"", "+", "\"", "current", "generation", "is", "at", "least", "[", "\"", "+", "gen", "to", "load", "+", "\"", "]", "\"", ")", ";", "}", "if", "(", "gen", "to", "load", "!", "=", "repository", "state", "id", ")", "{", "throw", "new", "repository", "exception", "(", "metadata", "name", "(", ")", ",", "\"", "concurrent", "modification", "of", "the", "index", "-", "n", "file", ",", "expected", "current", "generation", "[", "\"", "+", "repository", "state", "id", "+", "\"", "]", ",", "actual", "current", "generation", "[", "\"", "+", "gen", "to", "load", "+", "\"", "]", "\"", ")", ";", "}", "if", "(", "cached", "!", "=", "null", "&", "&", "cached", "generation", "(", ")", "=", "=", "gen", "to", "load", "&", "&", "cached", "has", "data", "(", ")", ")", "{", "return", "cached", "repository", "data", "(", ")", ";", "}", "return", "get", "repository", "data", "(", "gen", "to", "load", ")", ";", "}" ]
[ "schedules", "a", "task", "on", "{", "@", "link", "#", "instance", "}" ]
[ "static", "public", "task", "schedule", "(", "task", "task", ",", "float", "delay", "seconds", ",", "float", "interval", "seconds", ",", "int", "repeat", "count", ")", "{", "return", "instance", "(", ")", "schedule", "task", "(", "task", ",", "delay", "seconds", ",", "interval", "seconds", ",", "repeat", "count", ")", ";", "}" ]
[ "get", "a", "read", "-", "only", "list", "of", "all", "the", "items", "on", "the", "top", "shelf" ]
[ "public", "final", "list", "<", "potion", ">", "get", "top", "shelf", "(", ")", "{", "return", "list", "copy", "of", "(", "this", "top", "shelf", ")", ";", "}" ]
[ "test", "proper", "handling", "where", "an", "object", "tests", "equal", "to", "null" ]
[ "public", "void", "test", "invalid", "equals", "null", "(", ")", "{", "object", "obj", "=", "new", "invalid", "equals", "null", "object", "(", ")", ";", "equals", "tester", "add", "equality", "group", "(", "obj", ")", ";", "try", "{", "equals", "tester", "test", "equals", "(", ")", ";", "}", "catch", "(", "assertion", "failed", "error", "e", ")", "{", "assert", "error", "message", "(", "e", ",", "obj", "+", "\"", "must", "not", "be", "object", "#", "equals", "to", "null", "\"", ")", ";", "return", ";", "}", "fail", "(", "\"", "should", "get", "equal", "to", "null", "error", "\"", ")", ";", "}" ]
[ "today", ",", "in", "yarn", "there", "are", "no", "checks", "of", "any", "application", "id", "submitted", "base", "scenarios", ":", "the", "client", "submits", "an", "application", "to", "the", "router", "the", "router", "selects", "one", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "inserts", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "and", "the", "app", "id", "the", "state", "store", "replies", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "the", "router", "submits", "the", "request", "to", "the", "selected", "sub", "cluster", "in", "case", "of", "state", "store", "failure", ":", "the", "client", "submits", "an", "application", "to", "the", "router", "the", "router", "selects", "one", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "inserts", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "and", "the", "app", "id", "due", "to", "the", "state", "store", "down", "the", "router", "times", "out", "and", "it", "will", "retry", "depending", "on", "the", "federation", "facade", "settings", "the", "router", "replies", "to", "the", "client", "with", "an", "error", "message", "if", "state", "store", "fails", "after", "inserting", "the", "tuple", ":", "identical", "behavior", "as", "{", "@", "code", "client", "r", "m", "service", "}", "in", "case", "of", "router", "failure", ":", "scenario", "1", "–", "crash", "before", "submission", "to", "the", "resource", "manager", "the", "client", "submits", "an", "application", "to", "the", "router", "the", "router", "selects", "one", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "inserts", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "and", "the", "app", "id", "the", "router", "crashes", "the", "client", "timeouts", "and", "resubmits", "the", "application", "the", "router", "selects", "one", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "inserts", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc2", ")", "and", "the", "app", "id", "because", "the", "tuple", "is", "already", "inserted", "in", "the", "state", "store", ",", "it", "returns", "the", "previous", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "the", "router", "submits", "the", "request", "to", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "scenario", "2", "–", "crash", "after", "submission", "to", "the", "resource", "manager", "the", "client", "submits", "an", "application", "to", "the", "router", "the", "router", "selects", "one", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "inserts", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "and", "the", "app", "id", "the", "router", "submits", "the", "request", "to", "the", "selected", "sub", "cluster", "the", "router", "crashes", "the", "client", "timeouts", "and", "resubmit", "the", "application", "the", "router", "selects", "one", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "inserts", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc2", ")", "and", "the", "app", "id", "the", "state", "store", "replies", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "the", "router", "submits", "the", "request", "to", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "when", "a", "client", "re", "-", "submits", "the", "same", "application", "to", "the", "same", "rm", ",", "it", "does", "not", "raise", "an", "exception", "and", "replies", "with", "operation", "successful", "message", "in", "case", "of", "client", "failure", ":", "identical", "behavior", "as", "{", "@", "code", "client", "r", "m", "service", "}", "in", "case", "of", "resource", "manager", "failure", ":", "the", "client", "submits", "an", "application", "to", "the", "router", "the", "router", "selects", "one", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "inserts", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc1", ")", "and", "the", "app", "id", "the", "router", "submits", "the", "request", "to", "the", "selected", "sub", "cluster", "the", "entire", "sub", "cluster", "is", "down", "–", "all", "the", "r", "ms", "in", "ha", "or", "the", "master", "rm", "is", "not", "reachable", "the", "router", "times", "out", "the", "router", "selects", "a", "new", "sub", "cluster", "to", "forward", "the", "request", "the", "router", "update", "a", "tuple", "into", "state", "store", "with", "the", "selected", "sub", "cluster", "(", "e", "g", "sc2", ")", "and", "the", "app", "id", "the", "state", "store", "replies", "with", "ok", "answer", "the", "router", "submits", "the", "request", "to", "the", "selected", "sub", "cluster", "(", "e", "g", "sc2", ")" ]
[ "public", "submit", "application", "response", "submit", "application", "(", "submit", "application", "request", "request", ")", "throws", "yarn", "exception", ",", "i", "o", "exception", "{", "long", "start", "time", "=", "clock", "get", "time", "(", ")", ";", "if", "(", "request", "=", "=", "null", "|", "|", "request", "get", "application", "submission", "context", "(", ")", "=", "=", "null", "|", "|", "request", "get", "application", "submission", "context", "(", ")", "get", "application", "id", "(", ")", "=", "=", "null", ")", "{", "router", "metrics", "incr", "apps", "failed", "submitted", "(", ")", ";", "router", "server", "util", "log", "and", "throw", "exception", "(", "\"", "missing", "submit", "application", "request", "or", "\"", "+", "\"", "application", "submission", "contex", "information", "\"", ",", "null", ")", ";", "}", "application", "id", "application", "id", "=", "request", "get", "application", "submission", "context", "(", ")", "get", "application", "id", "(", ")", ";", "list", "<", "sub", "cluster", "id", ">", "blacklist", "=", "new", "array", "list", "<", "sub", "cluster", "id", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "submit", "retries", ";", "+", "+", "i", ")", "{", "sub", "cluster", "id", "sub", "cluster", "id", "=", "policy", "facade", "get", "home", "subcluster", "(", "request", "get", "application", "submission", "context", "(", ")", ",", "blacklist", ")", ";", "log", "info", "(", "\"", "submit", "application", "app", "id", "\"", "+", "application", "id", "+", "\"", "try", "#", "\"", "+", "i", "+", "\"", "on", "sub", "cluster", "\"", "+", "sub", "cluster", "id", ")", ";", "application", "home", "sub", "cluster", "app", "home", "sub", "cluster", "=", "application", "home", "sub", "cluster", "new", "instance", "(", "application", "id", ",", "sub", "cluster", "id", ")", ";", "if", "(", "i", "=", "=", "0", ")", "{", "try", "{", "/", "/", "persist", "the", "mapping", "of", "application", "id", "and", "the", "sub", "cluster", "id", "which", "has", "/", "/", "been", "selected", "as", "its", "home", "sub", "cluster", "id", "=", "federation", "facade", "add", "application", "home", "sub", "cluster", "(", "app", "home", "sub", "cluster", ")", ";", "}", "catch", "(", "yarn", "exception", "e", ")", "{", "router", "metrics", "incr", "apps", "failed", "submitted", "(", ")", ";", "string", "message", "=", "\"", "unable", "to", "insert", "the", "application", "id", "\"", "+", "application", "id", "+", "\"", "into", "the", "federation", "state", "store", "\"", ";", "router", "server", "util", "log", "and", "throw", "exception", "(", "message", ",", "e", ")", ";", "}", "}", "else", "{", "try", "{", "/", "/", "update", "the", "mapping", "of", "application", "id", "and", "the", "home", "sub", "cluster", "id", "to", "/", "/", "the", "new", "sub", "cluster", "id", "we", "have", "selected", "federation", "facade", "update", "application", "home", "sub", "cluster", "(", "app", "home", "sub", "cluster", ")", ";", "}", "catch", "(", "yarn", "exception", "e", ")", "{", "string", "message", "=", "\"", "unable", "to", "update", "the", "application", "id", "\"", "+", "application", "id", "+", "\"", "into", "the", "federation", "state", "store", "\"", ";", "sub", "cluster", "id", "sub", "cluster", "id", "in", "state", "store", "=", "federation", "facade", "get", "application", "home", "sub", "cluster", "(", "application", "id", ")", ";", "if", "(", "sub", "cluster", "id", "=", "=", "sub", "cluster", "id", "in", "state", "store", ")", "{", "log", "info", "(", "\"", "application", "\"", "+", "application", "id", "+", "\"", "already", "submitted", "on", "sub", "cluster", "\"", "+", "sub", "cluster", "id", ")", ";", "}", "else", "{", "router", "metrics", "incr", "apps", "failed", "submitted", "(", ")", ";", "router", "server", "util", "log", "and", "throw", "exception", "(", "message", ",", "e", ")", ";", "}", "}", "}", "application", "client", "protocol", "client", "r", "m", "proxy", "=", "get", "client", "r", "m", "proxy", "for", "sub", "cluster", "(", "sub", "cluster", "id", ")", ";", "submit", "application", "response", "response", "=", "null", ";", "try", "{", "response", "=", "client", "r", "m", "proxy", "submit", "application", "(", "request", ")", ";", "}", "catch", "(", "exception", "e", ")", "{", "log", "warn", "(", "\"", "unable", "to", "submit", "the", "application", "\"", "+", "application", "id", "+", "\"", "to", "sub", "cluster", "\"", "+", "sub", "cluster", "id", "get", "id", "(", ")", ",", "e", ")", ";", "}", "if", "(", "response", "!", "=", "null", ")", "{", "log", "info", "(", "\"", "application", "\"", "+", "request", "get", "application", "submission", "context", "(", ")", "get", "application", "name", "(", ")", "+", "\"", "with", "app", "id", "\"", "+", "application", "id", "+", "\"", "submitted", "on", "\"", "+", "sub", "cluster", "id", ")", ";", "long", "stop", "time", "=", "clock", "get", "time", "(", ")", ";", "router", "metrics", "succeeded", "apps", "submitted", "(", "stop", "time", "-", "start", "time", ")", ";", "return", "response", ";", "}", "else", "{", "/", "/", "empty", "response", "from", "the", "resource", "manager", "/", "/", "blacklist", "this", "subcluster", "for", "this", "request", "blacklist", "add", "(", "sub", "cluster", "id", ")", ";", "}", "}", "router", "metrics", "incr", "apps", "failed", "submitted", "(", ")", ";", "string", "err", "msg", "=", "\"", "application", "\"", "+", "request", "get", "application", "submission", "context", "(", ")", "get", "application", "name", "(", ")", "+", "\"", "with", "app", "id", "\"", "+", "application", "id", "+", "\"", "failed", "to", "be", "submitted", "\"", ";", "log", "error", "(", "err", "msg", ")", ";", "throw", "new", "yarn", "exception", "(", "err", "msg", ")", ";", "}" ]
[ "updates", "{", "@", "code", "stored", "permits", "}", "and", "{", "@", "code", "next", "free", "ticket", "micros", "}", "based", "on", "the", "current", "time" ]
[ "void", "resync", "(", "long", "now", "micros", ")", "{", "/", "/", "if", "next", "free", "ticket", "is", "in", "the", "past", ",", "resync", "to", "now", "if", "(", "now", "micros", ">", "next", "free", "ticket", "micros", ")", "{", "double", "new", "permits", "=", "(", "now", "micros", "-", "next", "free", "ticket", "micros", ")", "/", "cool", "down", "interval", "micros", "(", ")", ";", "stored", "permits", "=", "min", "(", "max", "permits", ",", "stored", "permits", "+", "new", "permits", ")", ";", "next", "free", "ticket", "micros", "=", "now", "micros", ";", "}", "}" ]
[ "check", "that", "the", "two", "method", "invocations", "necessary", "are", "independent", "and", "don", "'", "t", "conflict", "check", "also", "proxy", "exposure" ]
[ "public", "void", "test", "one", "advised", "object", "calls", "another", "(", ")", "{", "int", "age", "1", "=", "33", ";", "int", "age", "2", "=", "37", ";", "test", "bean", "target", "1", "=", "new", "test", "bean", "(", ")", ";", "proxy", "factory", "pf", "1", "=", "new", "proxy", "factory", "(", "target", "1", ")", ";", "/", "/", "permit", "proxy", "and", "invocation", "checkers", "to", "get", "context", "from", "aop", "context", "pf", "1", "set", "expose", "proxy", "(", "true", ")", ";", "nop", "interceptor", "di", "1", "=", "new", "nop", "interceptor", "(", ")", ";", "pf", "1", "add", "advice", "(", "0", ",", "di", "1", ")", ";", "pf", "1", "add", "advice", "(", "1", ",", "new", "proxy", "matcher", "interceptor", "(", ")", ")", ";", "pf", "1", "add", "advice", "(", "2", ",", "new", "check", "method", "invocation", "is", "same", "in", "and", "out", "interceptor", "(", ")", ")", ";", "pf", "1", "add", "advice", "(", "1", ",", "new", "check", "method", "invocation", "via", "thread", "local", "is", "same", "in", "and", "out", "interceptor", "(", ")", ")", ";", "/", "/", "must", "be", "first", "pf", "1", "add", "advice", "(", "0", ",", "expose", "invocation", "interceptor", "instance", ")", ";", "i", "test", "bean", "advised", "1", "=", "(", "i", "test", "bean", ")", "pf", "1", "get", "proxy", "(", ")", ";", "advised", "1", "set", "age", "(", "age", "1", ")", ";", "/", "/", "=", "1", "invocation", "test", "bean", "target", "2", "=", "new", "test", "bean", "(", ")", ";", "proxy", "factory", "pf", "2", "=", "new", "proxy", "factory", "(", "target", "2", ")", ";", "pf", "2", "set", "expose", "proxy", "(", "true", ")", ";", "nop", "interceptor", "di", "2", "=", "new", "nop", "interceptor", "(", ")", ";", "pf", "2", "add", "advice", "(", "0", ",", "di", "2", ")", ";", "pf", "2", "add", "advice", "(", "1", ",", "new", "proxy", "matcher", "interceptor", "(", ")", ")", ";", "pf", "2", "add", "advice", "(", "2", ",", "new", "check", "method", "invocation", "is", "same", "in", "and", "out", "interceptor", "(", ")", ")", ";", "pf", "2", "add", "advice", "(", "1", ",", "new", "check", "method", "invocation", "via", "thread", "local", "is", "same", "in", "and", "out", "interceptor", "(", ")", ")", ";", "pf", "2", "add", "advice", "(", "0", ",", "expose", "invocation", "interceptor", "instance", ")", ";", "i", "test", "bean", "advised", "2", "=", "(", "i", "test", "bean", ")", "create", "proxy", "(", "pf", "2", ")", ";", "advised", "2", "set", "age", "(", "age", "2", ")", ";", "advised", "1", "set", "spouse", "(", "advised", "2", ")", ";", "/", "/", "=", "2", "invocations", "/", "/", "=", "3", "invocations", "assert", "that", "(", "advised", "1", "get", "age", "(", ")", ")", "as", "(", "\"", "advised", "one", "has", "correct", "age", "\"", ")", "is", "equal", "to", "(", "age", "1", ")", ";", "assert", "that", "(", "advised", "2", "get", "age", "(", ")", ")", "as", "(", "\"", "advised", "two", "has", "correct", "age", "\"", ")", "is", "equal", "to", "(", "age", "2", ")", ";", "/", "/", "means", "extra", "call", "on", "advised", "2", "/", "/", "=", "4", "invocations", "on", "1", "and", "another", "one", "on", "2", "assert", "that", "(", "advised", "1", "get", "spouse", "(", ")", "get", "age", "(", ")", ")", "as", "(", "\"", "advised", "one", "spouse", "has", "correct", "age", "\"", ")", "is", "equal", "to", "(", "age", "2", ")", ";", "assert", "that", "(", "di", "1", "get", "count", "(", ")", ")", "as", "(", "\"", "one", "was", "invoked", "correct", "number", "of", "times", "\"", ")", "is", "equal", "to", "(", "4", ")", ";", "/", "/", "got", "hit", "by", "call", "to", "advised", "1", "get", "spouse", "(", ")", "get", "age", "(", ")", "assert", "that", "(", "di", "2", "get", "count", "(", ")", ")", "as", "(", "\"", "one", "was", "invoked", "correct", "number", "of", "times", "\"", ")", "is", "equal", "to", "(", "3", ")", ";", "}" ]
[ "clear", "fields", "so", "this", "object", "can", "be", "garbage", "collected" ]
[ "void", "dispose", "(", ")", "{", "program", "=", "null", ";", "listing", "=", "null", ";", "module", "=", "null", ";", "fragment", "=", "null", ";", "group", "=", "null", ";", "parent", "module", "=", "null", ";", "path", "=", "null", ";", "group", "path", "=", "null", ";", "}" ]
[ "allows", "to", "saved", "a", "specific", "field", "in", "the", "stash", "as", "key", "-", "value", "pair" ]
[ "public", "void", "stash", "value", "(", "string", "key", ",", "object", "value", ")", "{", "logger", "trace", "(", "\"", "stashing", "[", "{", "}", "]", "=", "[", "{", "}", "]", "\"", ",", "key", ",", "value", ")", ";", "object", "old", "=", "stash", "put", "(", "key", ",", "value", ")", ";", "if", "(", "old", "!", "=", "null", "&", "&", "old", "!", "=", "value", ")", "{", "logger", "trace", "(", "\"", "replaced", "stashed", "value", "[", "{", "}", "]", "with", "same", "key", "[", "{", "}", "]", "\"", ",", "old", ",", "key", ")", ";", "}", "}" ]
[ "retrieves", "a", "filename", "mapping", "from", "this", "cache" ]
[ "public", "synchronized", "string", "get", "(", "string", "parent", "m", "d", "5", ",", "string", "name", ")", "throws", "i", "o", "exception", "{", "if", "(", "parent", "m", "d", "5", "=", "=", "null", "|", "|", "parent", "m", "d", "5", "length", "(", ")", "!", "=", "file", "cache", "md5", "hexstr", "len", ")", "{", "throw", "new", "i", "o", "exception", "(", "\"", "bad", "md5", "for", "parent", "object", ":", "\"", "+", "parent", "m", "d", "5", "+", "\"", ",", "\"", "+", "name", ")", ";", "}", "string", "key", "=", "parent", "m", "d", "5", "+", "\"", "\"", "+", "name", ";", "return", "parent", "m", "d", "5", "obj", "name", "to", "m", "d", "5", "map", "get", "(", "key", ")", ";", "}" ]
[ "return", "the", "transaction", "phase", "to", "invoke", "the", "listener", "in" ]
[ "public", "transaction", "phase", "get", "transaction", "phase", "(", ")", "{", "return", "this", "transaction", "phase", ";", "}" ]
[ "gets", "all", "the", "values", "for", "the", "given", "header", "in", "the", "one", "to", "many", "map", ",", "performs", "a", "trim", "start", "(", ")", "on", "each", "return", "value" ]
[ "private", "static", "array", "list", "<", "string", ">", "get", "header", "values", "(", "final", "map", "<", "string", ",", "list", "<", "string", ">", ">", "headers", ",", "final", "string", "header", "name", ")", "{", "final", "array", "list", "<", "string", ">", "array", "of", "values", "=", "new", "array", "list", "<", "string", ">", "(", ")", ";", "list", "<", "string", ">", "values", "=", "null", ";", "for", "(", "final", "entry", "<", "string", ",", "list", "<", "string", ">", ">", "entry", ":", "headers", "entry", "set", "(", ")", ")", "{", "if", "(", "entry", "get", "key", "(", ")", "to", "lower", "case", "(", "locale", "root", ")", "equals", "(", "header", "name", ")", ")", "{", "values", "=", "entry", "get", "value", "(", ")", ";", "break", ";", "}", "}", "if", "(", "values", "!", "=", "null", ")", "{", "for", "(", "final", "string", "value", ":", "values", ")", "{", "/", "/", "canonicalization", "formula", "requires", "the", "string", "to", "be", "left", "/", "/", "trimmed", "array", "of", "values", "add", "(", "trim", "start", "(", "value", ")", ")", ";", "}", "}", "return", "array", "of", "values", ";", "}" ]
[ "get", "prefix", "ns", "boolean" ]
[ "public", "boolean", "get", "prefix", "ns", "boolean", "(", ")", "{", "return", "prefix", "ns", "boolean", ";", "}" ]
[ "finish", "the", "connect" ]
[ "private", "boolean", "do", "finish", "connect", "(", ")", "throws", "exception", "{", "if", "(", "socket", "finish", "connect", "(", ")", ")", "{", "clear", "flag", "(", "native", "epollout", ")", ";", "if", "(", "requested", "remote", "address", "instanceof", "inet", "socket", "address", ")", "{", "remote", "=", "compute", "remote", "addr", "(", "(", "inet", "socket", "address", ")", "requested", "remote", "address", ",", "socket", "remote", "address", "(", ")", ")", ";", "}", "requested", "remote", "address", "=", "null", ";", "return", "true", ";", "}", "set", "flag", "(", "native", "epollout", ")", ";", "return", "false", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "creates", "a", "copy", "of", "the", "build", "options", "object", "that", "contains", "copies", "of", "the", "fragment", "options", "and", "starlark", "options" ]
[ "public", "build", "options", "clone", "(", ")", "{", "immutable", "map", "builder", "<", "class", "<", "?", "extends", "fragment", "options", ">", ",", "fragment", "options", ">", "native", "options", "builder", "=", "immutable", "map", "builder", "(", ")", ";", "for", "(", "map", "entry", "<", "class", "<", "?", "extends", "fragment", "options", ">", ",", "fragment", "options", ">", "entry", ":", "fragment", "options", "map", "entry", "set", "(", ")", ")", "{", "native", "options", "builder", "put", "(", "entry", "get", "key", "(", ")", ",", "entry", "get", "value", "(", ")", "clone", "(", ")", ")", ";", "}", "return", "new", "build", "options", "(", "native", "options", "builder", "build", "(", ")", ",", "immutable", "map", "copy", "of", "(", "starlark", "options", "map", ")", ")", ";", "}" ]
[ "reduces", "the", "mark", "limit", "to", "match", "the", "current", "buffer", "length", "to", "prevent", "the", "buffer", "from", "continuing", "to", "increase", "in", "size", "subsequent", "calls", "to", "{", "@", "link", "#", "mark", "(", "int", ")", "}", "will", "be", "obeyed", "and", "may", "cause", "the", "buffer", "size", "to", "increase" ]
[ "public", "synchronized", "void", "fix", "mark", "limit", "(", ")", "{", "marklimit", "=", "buf", "length", ";", "}" ]
[ "returns", "a", "new", "supplier", "which", "is", "the", "composition", "of", "the", "provided", "function", "and", "supplier", "in", "other", "words", ",", "the", "new", "supplier", "'", "s", "value", "will", "be", "computed", "by", "retrieving", "the", "value", "from", "{", "@", "code", "supplier", "}", ",", "and", "then", "applying", "{", "@", "code", "function", "}", "to", "that", "value", "note", "that", "the", "resulting", "supplier", "will", "not", "call", "{", "@", "code", "supplier", "}", "or", "invoke", "{", "@", "code", "function", "}", "until", "it", "is", "called" ]
[ "public", "static", "<", "f", ",", "t", ">", "supplier", "<", "t", ">", "compose", "(", "function", "<", "?", "super", "f", ",", "t", ">", "function", ",", "supplier", "<", "f", ">", "supplier", ")", "{", "return", "new", "supplier", "composition", "<", ">", "(", "function", ",", "supplier", ")", ";", "}" ]
[ "unbind", "the", "hibernate", "{", "@", "code", "session", "}", "from", "the", "thread", "and", "close", "it", ")" ]
[ "public", "void", "after", "completion", "(", "web", "request", "request", ",", "@", "nullable", "exception", "ex", ")", "throws", "data", "access", "exception", "{", "if", "(", "!", "decrement", "participate", "count", "(", "request", ")", ")", "{", "session", "holder", "session", "holder", "=", "(", "session", "holder", ")", "transaction", "synchronization", "manager", "unbind", "resource", "(", "obtain", "session", "factory", "(", ")", ")", ";", "logger", "debug", "(", "\"", "closing", "hibernate", "session", "in", "open", "session", "in", "view", "interceptor", "\"", ")", ";", "session", "factory", "utils", "close", "session", "(", "session", "holder", "get", "session", "(", ")", ")", ";", "}", "}" ]
[ "reads", "the", "input", "class", "files" ]
[ "private", "void", "read", "input", "(", ")", "throws", "i", "o", "exception", "{", "if", "(", "configuration", "verbose", ")", "{", "system", "out", "println", "(", "\"", "reading", "input", "\"", ")", ";", "}", "/", "/", "fill", "the", "program", "class", "pool", "and", "the", "library", "class", "pool", "new", "input", "reader", "(", "configuration", ")", "execute", "(", "program", "class", "pool", ",", "library", "class", "pool", ")", ";", "}" ]
[ "adds", "the", "given", "defines", "to", "the", "compiler", "command", "line", "of", "this", "target", "as", "well", "as", "its", "dependent", "targets" ]
[ "public", "cc", "compilation", "helper", "add", "defines", "(", "nested", "set", "<", "string", ">", "defines", ")", "{", "this", "defines", "add", "all", "(", "defines", "to", "list", "(", ")", ")", ";", "return", "this", ";", "}" ]
[ "ensures", "internal", "deduping", "occurs" ]
[ "@", "test", "public", "void", "build", "redundant", "ignored", "(", ")", "{", "span", "builder", "builder", "=", "span", "new", "builder", "(", ")", "trace", "id", "(", "\"", "a", "\"", ")", ";", "list", "<", "span", ">", "trace", "=", "as", "list", "(", "builder", "id", "(", "\"", "a", "\"", ")", "build", "(", ")", ",", "builder", "id", "(", "\"", "b", "\"", ")", "build", "(", ")", ",", "builder", "build", "(", ")", ")", ";", "span", "node", "tree", "=", "new", "span", "node", "builder", "(", "logger", ")", "build", "(", "trace", ")", ";", "assert", "that", "(", "tree", "span", ")", "is", "equal", "to", "(", "trace", "get", "(", "0", ")", ")", ";", "assert", "that", "(", "tree", "children", "(", ")", ")", "extracting", "(", "span", "node", ":", ":", "span", ")", "contains", "exactly", "(", "trace", "get", "(", "1", ")", ")", ";", "}" ]