docstring_tokens
sequence
code_tokens
sequence
[ "this", "method", "returns", "average", "frequency", "of", "events", "happened", "within", "predefined", "timeframe" ]
[ "if", "(", "is", "alive", "(", ")", ")", "{", "return", "1", ";", "}", "else", "{", "return", "0", ";", "}" ]
[ "this", "method", "returns", "total", "number", "of", "events", "happened", "withing", "predefined", "timeframe" ]
[ "if", "(", "is", "alive", "(", ")", ")", "{", "return", "1", ";", "}", "else", "{", "return", "0", ";", "}" ]
[ "copy", "information", "from", "the", "meta", "-", "data", "input", "to", "the", "dialog", "fields" ]
[ "w", "types", "select", "(", "input", "get", "file", "type", "(", ")", ")", ";", "if", "(", "input", "get", "filename", "field", "(", ")", "!", "=", "null", ")", "{", "w", "filename", "field", "set", "text", "(", "input", "get", "filename", "field", "(", ")", ")", ";", "}", "w", "stepname", "select", "all", "(", ")", ";", "w", "stepname", "set", "focus", "(", ")", ";" ]
[ "override", "this", "to", "set", "the", "datatype", "of", "the", "tests", "defined", "in", "the", "child", "class" ]
[ "return", "data", "buffer", "type", "float", ";" ]
[ "checks", "whether", "a", "point", "is", "within", "the", "bounding", "box", "of", "this", "graphic", "the", "provided", "point", "should", "be", "relative", "to", "this", "graphic", "s", "containing", "overlay" ]
[ "text", "block", "text", "=", "m", "text", ";", "if", "(", "text", "=", "=", "null", ")", "{", "return", "false", ";", "}", "rect", "f", "rect", "=", "new", "rect", "f", "(", "text", "get", "bounding", "box", "(", ")", ")", ";", "rect", "left", "=", "translate", "x", "(", "rect", "left", ")", ";", "rect", "top", "=", "translate", "y", "(", "rect", "top", ")", ";", "rect", "right", "=", "translate", "x", "(", "rect", "right", ")", ";", "rect", "bottom", "=", "translate", "y", "(", "rect", "bottom", ")", ";", "return", "(", "rect", "left", "<", "x", "&", "&", "rect", "right", ">", "x", "&", "&", "rect", "top", "<", "y", "&", "&", "rect", "bottom", ">", "y", ")", ";" ]
[ "this", "method", "takes", "the", "value", "of", "{", "@", "link", "#", "get", "average", "bytes", "per", "sec", "(", ")", "}", "and", "calculates", "the", "kbps", "out", "of", "it", "by", "simply", "multiplying", "by", "8", "and", "dividing", "by", "1000", "<", "br", ">" ]
[ "return", "(", "int", ")", "get", "average", "bytes", "per", "sec", "(", ")", "*", "8", "/", "1000", ";" ]
[ "this", "mehtod", "returns", "whether", "the", "audio", "stream", "data", "is", "error", "concealed", "<", "br", ">", "for", "now", "only", "interleaved", "concealment", "is", "known", "<", "br", ">" ]
[ "return", "get", "error", "concealment", "(", ")", "equals", "(", "guid", "guid", "audio", "error", "concealement", "interleaved", ")", ";" ]
[ "sets", "the", "bits", "per", "sample" ]
[ "this", "bits", "per", "sample", "=", "bps", ";" ]
[ "sets", "the", "block", "alignment" ]
[ "this", "block", "alignment", "=", "align", ";" ]
[ "sets", "the", "codec", "data" ]
[ "if", "(", "codec", "specific", "data", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", ")", ";", "}", "this", "codec", "data", "=", "codec", "specific", "data", "clone", "(", ")", ";" ]
[ "this", "method", "sets", "the", "error", "concealment", "type", "which", "is", "given", "by", "two", "g", "u", "i", "ds", "<", "br", ">" ]
[ "this", "error", "concealment", "=", "err", "conc", ";" ]
[ "the", "implementation", "of", "the", "algorithm", "renamed", "from", "{", "@", "link", "graph", "algorithm", "#", "run", "(", "graph", ")", "}" ]
[ "protected", "abstract", "graph", "<", "out", "k", ",", "out", "vv", ",", "out", "ev", ">", "run", "internal", "(", "graph", "<", "in", "k", ",", "in", "vv", ",", "in", "ev", ">", "input", ")", "throws", "exception", ";" ]
[ "consider", "using", "{" ]
[ "this", "min", "=", "math", "min", "(", "this", "min", ",", "value", ")", ";" ]
[ "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-" ]
[ "this", "min", "=", "math", "min", "(", "this", "min", ",", "value", ")", ";" ]
[ "shows", "the", "register", "values", "of", "a", "given", "thread", "in", "the", "gui" ]
[ "if", "(", "old", "thread", "!", "=", "null", ")", "{", "old", "thread", "remove", "listener", "(", "m", "thread", "listener", ")", ";", "}", "if", "(", "new", "thread", "!", "=", "null", ")", "{", "m", "data", "provider", "set", "register", "information", "(", "new", "thread", "get", "register", "values", "(", ")", ")", ";", "new", "thread", "add", "listener", "(", "m", "thread", "listener", ")", ";", "}", "update", "gui", "(", ")", ";" ]
[ "updates", "the", "gui", "according", "to", "the", "state", "of", "the", "debugger" ]
[ "final", "i", "debugger", "active", "debugger", "=", "m", "debug", "perspective", "model", "get", "current", "selected", "debugger", "(", ")", ";", "final", "target", "process", "thread", "active", "thread", "=", "active", "debugger", "=", "=", "null", "?", "null", ":", "active", "debugger", "get", "process", "manager", "(", ")", "get", "active", "thread", "(", ")", ";", "m", "register", "view", "set", "enabled", "(", "active", "thread", "!", "=", "null", "&", "&", "active", "debugger", "!", "=", "null", "&", "&", "active", "debugger", "is", "connected", "(", ")", ")", ";" ]
[ "cleans", "up", "allocated", "resources" ]
[ "m", "debug", "perspective", "model", "remove", "listener", "(", "m", "debug", "listener", ")", ";", "final", "i", "debugger", "active", "debugger", "=", "m", "debug", "perspective", "model", "get", "current", "selected", "debugger", "(", ")", ";", "final", "target", "process", "thread", "active", "thread", "=", "active", "debugger", "=", "=", "null", "?", "null", ":", "active", "debugger", "get", "process", "manager", "(", ")", "get", "active", "thread", "(", ")", ";", "if", "(", "active", "thread", "!", "=", "null", ")", "{", "active", "thread", "remove", "listener", "(", "m", "thread", "listener", ")", ";", "}" ]
[ "the", "default", "implementation", "calls", "{", "@", "link", "#", "collect", "match", "(", "search", "match", ")", "}", "for", "all", "matches", "that", "make", "it", "through", "{", "@", "link", "#", "filter", "match", "(", "search", "match", ")", "}" ]
[ "if", "(", "!", "filter", "match", "(", "match", ")", ")", "collect", "match", "(", "match", ")", ";" ]
[ "return", "a", "localized", "string", "for", "am", "or", "pm" ]
[ "return", "locale", "data", "get", "(", "locale", "get", "default", "(", ")", ")", "am", "pm", "[", "ampm", "-", "calendar", "am", "]", ";" ]
[ "return", "a", "localized", "string", "for", "the", "month", "of", "the", "year" ]
[ "locale", "data", "d", "=", "locale", "data", "get", "(", "locale", "get", "default", "(", ")", ")", ";", "string", "[", "]", "names", ";", "switch", "(", "abbrev", ")", "{", "case", "length", "long", ":", "names", "=", "d", "long", "month", "names", ";", "break", ";", "case", "length", "medium", ":", "names", "=", "d", "short", "month", "names", ";", "break", ";", "case", "length", "short", ":", "names", "=", "d", "short", "month", "names", ";", "break", ";", "case", "length", "shorter", ":", "names", "=", "d", "short", "month", "names", ";", "break", ";", "case", "length", "shortest", ":", "names", "=", "d", "tiny", "month", "names", ";", "break", ";", "default", ":", "names", "=", "d", "short", "month", "names", ";", "break", ";", "}", "return", "names", "[", "month", "]", ";" ]
[ "returns", "a", "string", "describing", "the", "elapsed", "time", "since", "start", "time", "<", "p", ">", "the", "minimum", "timespan", "to", "report", "is", "set", "to", "{" ]
[ "return", "get", "relative", "time", "span", "string", "(", "start", "time", ",", "system", "current", "time", "millis", "(", ")", ",", "minute", "in", "millis", ")", ";" ]
[ "returns", "a", "string", "describing", "time", "as", "a", "time", "relative", "to", "now", "<", "p", ">", "time", "spans", "in", "the", "past", "are", "formatted", "like", "42", "minutes", "ago", "time", "spans", "in", "the", "future", "are", "formatted", "like", "in", "42", "minutes" ]
[ "int", "flags", "=", "format", "show", "date", "|", "format", "show", "year", "|", "format", "abbrev", "month", ";", "return", "get", "relative", "time", "span", "string", "(", "time", ",", "now", ",", "min", "resolution", ",", "flags", ")", ";" ]
[ "returns", "a", "string", "describing", "time", "as", "a", "time", "relative", "to", "now", "<", "p", ">", "time", "spans", "in", "the", "past", "are", "formatted", "like", "42", "minutes", "ago", "time", "spans", "in", "the", "future", "are", "formatted", "like", "in", "42", "minutes", "<", "p", ">", "can", "use", "{", "@", "link", "#", "format", "abbrev", "relative", "}", "flag", "to", "use", "abbreviated", "relative", "times", "like", "42", "mins", "ago" ]
[ "return", "relative", "date", "time", "formatter", "get", "relative", "time", "span", "string", "(", "locale", "get", "default", "(", ")", ",", "time", "zone", "get", "default", "(", ")", ",", "time", ",", "now", ",", "min", "resolution", ",", "flags", ")", ";" ]
[ "returns", "the", "given", "duration", "in", "a", "human", "-", "friendly", "format", "for", "example", "4", "minutes", "or", "1", "second", "returns", "only", "the", "largest", "meaningful", "unit", "of", "time", "from", "seconds", "up", "to", "hours" ]
[ "return", "format", "duration", "(", "millis", ",", "length", "long", ")", ";" ]
[ "returns", "the", "given", "duration", "in", "a", "human", "-", "friendly", "format", "for", "example", "4", "minutes", "or", "1", "second", "returns", "only", "the", "largest", "meaningful", "unit", "of", "time", "from", "seconds", "up", "to", "hours", "<", "p", ">", "you", "can", "use", "abbrev", "to", "specify", "a", "preference", "for", "abbreviations", "(", "but", "note", "that", "some", "locales", "may", "not", "have", "abbreviations", ")", "use", "length", "long", "for", "the", "full", "spelling", "(", "e", "g", "2", "hours", ")", "length", "short", "for", "the", "abbreviated", "spelling", "if", "available", "(", "e", "g", "2", "hr", ")", "and", "length", "shortest", "for", "the", "briefest", "form", "available", "(", "e", "g", "2h", ")" ]
[ "final", "format", "width", "width", ";", "switch", "(", "abbrev", ")", "{", "case", "length", "long", ":", "width", "=", "format", "width", "wide", ";", "break", ";", "case", "length", "short", ":", "case", "length", "shorter", ":", "case", "length", "medium", ":", "width", "=", "format", "width", "short", ";", "break", ";", "case", "length", "shortest", ":", "width", "=", "format", "width", "narrow", ";", "break", ";", "default", ":", "width", "=", "format", "width", "wide", ";", "}", "final", "measure", "format", "formatter", "=", "measure", "format", "get", "instance", "(", "locale", "get", "default", "(", ")", ",", "width", ")", ";", "if", "(", "millis", ">", "=", "hour", "in", "millis", ")", "{", "final", "int", "hours", "=", "(", "int", ")", "(", "(", "millis", "+", "1800000", ")", "/", "hour", "in", "millis", ")", ";", "return", "formatter", "format", "(", "new", "measure", "(", "hours", ",", "measure", "unit", "hour", ")", ")", ";", "}", "else", "if", "(", "millis", ">", "=", "minute", "in", "millis", ")", "{", "final", "int", "minutes", "=", "(", "int", ")", "(", "(", "millis", "+", "30000", ")", "/", "minute", "in", "millis", ")", ";", "return", "formatter", "format", "(", "new", "measure", "(", "minutes", ",", "measure", "unit", "minute", ")", ")", ";", "}", "else", "{", "final", "int", "seconds", "=", "(", "int", ")", "(", "(", "millis", "+", "500", ")", "/", "second", "in", "millis", ")", ";", "return", "formatter", "format", "(", "new", "measure", "(", "seconds", ",", "measure", "unit", "second", ")", ")", ";", "}" ]
[ "formats", "an", "elapsed", "time", "in", "the", "form", "mm", ":", "ss", "or", "h", ":", "mm", ":", "ss", "for", "display", "on", "the", "call", "-", "in", "-", "progress", "screen" ]
[ "return", "format", "elapsed", "time", "(", "null", ",", "elapsed", "seconds", ")", ";" ]
[ "format", "a", "date", "/", "time", "such", "that", "if", "the", "then", "is", "on", "the", "same", "day", "as", "now", "it", "shows", "just", "the", "time", "and", "if", "it", "s", "a", "different", "day", "it", "shows", "just", "the", "date" ]
[ "calendar", "then", "cal", "=", "new", "gregorian", "calendar", "(", ")", ";", "then", "cal", "set", "time", "in", "millis", "(", "then", ")", ";", "date", "then", "date", "=", "then", "cal", "get", "time", "(", ")", ";", "calendar", "now", "cal", "=", "new", "gregorian", "calendar", "(", ")", ";", "now", "cal", "set", "time", "in", "millis", "(", "now", ")", ";", "java", "text", "date", "format", "f", ";", "if", "(", "then", "cal", "get", "(", "calendar", "year", ")", "=", "=", "now", "cal", "get", "(", "calendar", "year", ")", "&", "&", "then", "cal", "get", "(", "calendar", "month", ")", "=", "=", "now", "cal", "get", "(", "calendar", "month", ")", "&", "&", "then", "cal", "get", "(", "calendar", "day", "of", "month", ")", "=", "=", "now", "cal", "get", "(", "calendar", "day", "of", "month", ")", ")", "{", "f", "=", "java", "text", "date", "format", "get", "time", "instance", "(", "time", "style", ")", ";", "}", "else", "{", "f", "=", "java", "text", "date", "format", "get", "date", "instance", "(", "date", "style", ")", ";", "}", "return", "f", "format", "(", "then", "date", ")", ";" ]
[ "formats", "a", "date", "or", "a", "time", "range", "according", "to", "the", "local", "conventions", "<", "p", ">", "note", "that", "this", "is", "a", "convenience", "method", "using", "it", "involves", "creating", "an", "internal", "{", "@", "link", "java", "util", "formatter", "}", "instance", "on", "-", "the", "-", "fly", "which", "is", "somewhat", "costly", "in", "terms", "of", "memory", "and", "time", "this", "is", "probably", "acceptable", "if", "you", "use", "the", "method", "only", "rarely", "but", "if", "you", "rely", "on", "it", "for", "formatting", "a", "large", "number", "of", "dates", "consider", "creating", "and", "reusing", "your", "own", "{", "@", "link", "java", "util", "formatter", "}", "instance", "and", "use", "the", "version", "of", "{", "@", "link", "#", "format", "date", "range", "(", "context", "long", "long", "int", ")", "format", "date", "range", "}", "that", "takes", "a", "{", "@", "link", "java", "util", "formatter", "}" ]
[ "formatter", "f", "=", "new", "formatter", "(", "new", "string", "builder", "(", "50", ")", ",", "locale", "get", "default", "(", ")", ")", ";", "return", "format", "date", "range", "(", "context", ",", "f", ",", "start", "millis", ",", "end", "millis", ",", "flags", ")", "to", "string", "(", ")", ";" ]
[ "formats", "a", "date", "or", "a", "time", "range", "according", "to", "the", "local", "conventions", "<", "p", ">", "note", "that", "this", "is", "a", "convenience", "method", "for", "formatting", "the", "date", "or", "time", "range", "in", "the", "local", "time", "zone", "if", "you", "want", "to", "specify", "the", "time", "zone", "please", "use", "{", "@", "link", "#", "format", "date", "range", "(", "context", "formatter", "long", "long", "int", "string", ")", "format", "date", "range", "}" ]
[ "return", "format", "date", "range", "(", "context", ",", "formatter", ",", "start", "millis", ",", "end", "millis", ",", "flags", ",", "null", ")", ";" ]
[ "formats", "a", "date", "or", "a", "time", "according", "to", "the", "local", "conventions", "there", "are", "lots", "of", "options", "that", "allow", "the", "caller", "to", "control", "for", "example", "if", "the", "time", "is", "shown", "if", "the", "day", "of", "the", "week", "is", "shown", "if", "the", "month", "name", "is", "abbreviated", "if", "noon", "is", "shown", "instead", "of", "1", "2pm", "and", "so", "on", "for", "the", "complete", "list", "of", "options", "see", "the", "documentation", "for", "{", "@", "link", "#", "format", "date", "range", "}", "<", "p", ">", "example", "output", "strings", "(", "date", "formats", "in", "these", "examples", "are", "shown", "using", "the", "us", "date", "format", "convention", "but", "that", "may", "change", "depending", "on", "the", "local", "settings", ")", ":", "<", "ul", ">", "<", "li", ">", "10", ":", "1", "5am", "<", "/", "li", ">", "<", "li", ">", "3", ":", "0", "0pm", "<", "/", "li", ">", "<", "li", ">", "3pm", "<", "/", "li", ">", "<", "li", ">", "3pm", "<", "/", "li", ">", "<", "li", ">", "08", ":", "00", "<", "/", "li", ">", "<", "li", ">", "17", ":", "00", "<", "/", "li", ">", "<", "li", ">", "noon", "<", "/", "li", ">", "<", "li", ">", "noon", "<", "/", "li", ">", "<", "li", ">", "midnight", "<", "/", "li", ">", "<", "li", ">", "midnight", "<", "/", "li", ">", "<", "li", ">", "oct", "31", "<", "/", "li", ">", "<", "li", ">", "oct", "31", "2007", "<", "/", "li", ">", "<", "li", ">", "october", "31", "2007", "<", "/", "li", ">", "<", "li", ">", "1", "0am", "oct", "31", "<", "/", "li", ">", "<", "li", ">", "17", ":", "00", "oct", "31", "<", "/", "li", ">", "<", "li", ">", "wed", "<", "/", "li", ">", "<", "li", ">", "wednesday", "<", "/", "li", ">", "<", "li", ">", "1", "0am", "wed", "oct", "31", "<", "/", "li", ">", "<", "li", ">", "wed", "oct", "31", "<", "/", "li", ">", "<", "li", ">", "wednesday", "oct", "31", "<", "/", "li", ">", "<", "li", ">", "wed", "oct", "31", "2007", "<", "/", "li", ">", "<", "li", ">", "wed", "october", "31", "<", "/", "li", ">", "<", "li", ">", "10", "/", "31", "/", "2007", "<", "/", "li", ">", "<", "/", "ul", ">" ]
[ "return", "format", "date", "range", "(", "context", ",", "millis", ",", "millis", ",", "flags", ")", ";" ]
[ "test", "the", "scenario", "where", "the", "max", "container", "size", "is", "the", "default" ]
[ "int", "default", "num", "instancesper", "container", "=", "4", ";", "packing", "plan", "packing", "plan", "=", "pack", "(", "topology", ")", ";", "assert", "assert", "equals", "(", "2", ",", "packing", "plan", "get", "containers", "(", ")", "size", "(", ")", ")", ";", "assert", "assert", "equals", "(", "total", "instances", ",", "packing", "plan", "get", "instance", "count", "(", ")", ")", ";", "byte", "amount", "default", "ram", "=", "instance", "default", "resources", "get", "ram", "(", ")", "multiply", "(", "default", "num", "instancesper", "container", ")", "increase", "by", "(", "default", "container", "padding", ")", ";", "assert", "packing", "assert", "container", "ram", "(", "packing", "plan", "get", "containers", "(", ")", ",", "default", "ram", ")", ";", "assert", "packing", "assert", "num", "instances", "(", "packing", "plan", "get", "containers", "(", ")", ",", "bolt", "name", ",", "3", ")", ";", "assert", "packing", "assert", "num", "instances", "(", "packing", "plan", "get", "containers", "(", ")", ",", "spout", "name", ",", "4", ")", ";" ]
[ "test", "the", "scenario", "where", "the", "max", "container", "size", "is", "the", "default", "but", "padding", "is", "configured" ]
[ "int", "padding", "=", "50", ";", "int", "default", "num", "instancesper", "container", "=", "4", ";", "topology", "config", "set", "container", "padding", "percentage", "(", "padding", ")", ";", "topology", "a", "p", "i", "topology", "new", "topology", "=", "get", "topology", "(", "spout", "parallelism", ",", "bolt", "parallelism", ",", "topology", "config", ")", ";", "packing", "plan", "packing", "plan", "=", "pack", "(", "new", "topology", ")", ";", "assert", "assert", "equals", "(", "2", ",", "packing", "plan", "get", "containers", "(", ")", "size", "(", ")", ")", ";", "assert", "assert", "equals", "(", "total", "instances", ",", "packing", "plan", "get", "instance", "count", "(", ")", ")", ";", "byte", "amount", "default", "ram", "=", "instance", "default", "resources", "get", "ram", "(", ")", "multiply", "(", "default", "num", "instancesper", "container", ")", "increase", "by", "(", "padding", ")", ";", "assert", "packing", "assert", "container", "ram", "(", "packing", "plan", "get", "containers", "(", ")", ",", "default", "ram", ")", ";", "assert", "packing", "assert", "num", "instances", "(", "packing", "plan", "get", "containers", "(", ")", ",", "bolt", "name", ",", "3", ")", ";", "assert", "packing", "assert", "num", "instances", "(", "packing", "plan", "get", "containers", "(", ")", ",", "spout", "name", ",", "4", ")", ";" ]
[ "test", "the", "scenario", "where", "the", "max", "container", "size", "is", "the", "default", "and", "scaling", "is", "requested" ]
[ "int", "default", "num", "instancesper", "container", "=", "4", ";", "int", "num", "scaling", "instances", "=", "5", ";", "map", "<", "string", ",", "integer", ">", "component", "changes", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "component", "changes", "put", "(", "bolt", "name", ",", "num", "scaling", "instances", ")", ";", "int", "num", "containers", "before", "repack", "=", "2", ";", "packing", "plan", "new", "packing", "plan", "=", "do", "default", "scaling", "test", "(", "component", "changes", ",", "num", "containers", "before", "repack", ")", ";", "assert", "assert", "equals", "(", "3", ",", "new", "packing", "plan", "get", "containers", "(", ")", "size", "(", ")", ")", ";", "assert", "assert", "equals", "(", "(", "integer", ")", "(", "total", "instances", "+", "num", "scaling", "instances", ")", ",", "new", "packing", "plan", "get", "instance", "count", "(", ")", ")", ";", "assert", "packing", "assert", "containers", "(", "new", "packing", "plan", "get", "containers", "(", ")", ",", "bolt", "name", ",", "spout", "name", ",", "instance", "default", "resources", "get", "ram", "(", ")", ",", "instance", "default", "resources", "get", "ram", "(", ")", ",", "null", ")", ";", "for", "(", "packing", "plan", "container", "plan", "container", "plan", ":", "new", "packing", "plan", "get", "containers", "(", ")", ")", "{", "assert", "assert", "equals", "(", "math", "round", "(", "packing", "utils", "increase", "by", "(", "default", "num", "instancesper", "container", "*", "instance", "default", "resources", "get", "cpu", "(", ")", ",", "default", "container", "padding", ")", ")", ",", "(", "long", ")", "container", "plan", "get", "required", "resource", "(", ")", "get", "cpu", "(", ")", ")", ";", "assert", "assert", "equals", "(", "instance", "default", "resources", "get", "ram", "(", ")", "multiply", "(", "default", "num", "instancesper", "container", ")", "increase", "by", "(", "default", "container", "padding", ")", ",", "container", "plan", "get", "required", "resource", "(", ")", "get", "ram", "(", ")", ")", ";", "assert", "assert", "equals", "(", "instance", "default", "resources", "get", "disk", "(", ")", "multiply", "(", "default", "num", "instancesper", "container", ")", "increase", "by", "(", "default", "container", "padding", ")", ",", "container", "plan", "get", "required", "resource", "(", ")", "get", "disk", "(", ")", ")", ";", "}" ]
[ "test", "the", "scenario", "ram", "map", "config", "is", "partially", "set", "and", "scaling", "is", "requested" ]
[ "byte", "amount", "bolt", "ram", "=", "byte", "amount", "from", "gigabytes", "(", "4", ")", ";", "byte", "amount", "max", "container", "ram", "=", "byte", "amount", "from", "gigabytes", "(", "10", ")", ";", "topology", "config", "set", "container", "max", "ram", "hint", "(", "max", "container", "ram", ")", ";", "topology", "config", "set", "component", "ram", "(", "bolt", "name", ",", "bolt", "ram", ")", ";", "topology", "a", "p", "i", "topology", "topology", "explicit", "ram", "map", "=", "get", "topology", "(", "spout", "parallelism", ",", "bolt", "parallelism", ",", "topology", "config", ")", ";", "int", "num", "scaling", "instances", "=", "3", ";", "map", "<", "string", ",", "integer", ">", "component", "changes", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "component", "changes", "put", "(", "bolt", "name", ",", "num", "scaling", "instances", ")", ";", "int", "num", "containers", "before", "repack", "=", "2", ";", "packing", "plan", "new", "packing", "plan", "=", "do", "scaling", "test", "(", "topology", "explicit", "ram", "map", ",", "component", "changes", ",", "bolt", "ram", ",", "bolt", "parallelism", ",", "instance", "default", "resources", "get", "ram", "(", ")", ",", "spout", "parallelism", ",", "num", "containers", "before", "repack", ",", "total", "instances", ")", ";", "assert", "assert", "equals", "(", "4", ",", "new", "packing", "plan", "get", "containers", "(", ")", "size", "(", ")", ")", ";", "assert", "assert", "equals", "(", "(", "integer", ")", "(", "total", "instances", "+", "num", "scaling", "instances", ")", ",", "new", "packing", "plan", "get", "instance", "count", "(", ")", ")", ";", "assert", "packing", "assert", "containers", "(", "new", "packing", "plan", "get", "containers", "(", ")", ",", "bolt", "name", ",", "spout", "name", ",", "bolt", "ram", ",", "instance", "default", "resources", "get", "ram", "(", ")", ",", "null", ")", ";" ]
[ "set", "the", "value", "of", "the", "{" ]
[ "this", "id", "=", "id", ";" ]
[ "get", "the", "value", "of", "the", "{" ]
[ "return", "this", "id", ";" ]
[ "get", "the", "value", "for", "the", "html", "{" ]
[ "return", "get", "property", "path", "(", ")", ";" ]
[ "get", "the", "value", "of", "the", "nested", "path", "that", "may", "have", "been", "exposed", "by", "the", "{" ]
[ "return", "(", "string", ")", "this", "page", "context", "get", "attribute", "(", "nested", "path", "variable", "name", ",", "page", "context", "request", "scope", ")", ";" ]
[ "build", "the", "property", "path", "for", "this", "tag", "including", "the", "nested", "path", "but", "<", "i", ">", "not", "<", "/", "i", ">", "prefixed", "with", "the", "name", "of", "the", "form", "attribute" ]
[ "string", "expression", "=", "get", "bind", "status", "(", ")", "get", "expression", "(", ")", ";", "return", "(", "expression", "!", "=", "null", "?", "expression", ":", "\"", "\"", ")", ";" ]
[ "get", "the", "bound", "value" ]
[ "return", "get", "bind", "status", "(", ")", "get", "value", "(", ")", ";" ]
[ "get", "the", "{" ]
[ "return", "get", "bind", "status", "(", ")", "get", "editor", "(", ")", ";" ]
[ "exposes", "the", "{" ]
[ "return", "get", "property", "editor", "(", ")", ";" ]
[ "get", "a", "display", "string", "for", "the", "given", "value", "converted", "by", "a", "property", "editor", "that", "the", "bind", "status", "may", "have", "registered", "for", "the", "value", "s", "class" ]
[ "property", "editor", "editor", "=", "(", "value", "!", "=", "null", "?", "get", "bind", "status", "(", ")", "find", "editor", "(", "value", "get", "class", "(", ")", ")", ":", "null", ")", ";", "return", "get", "display", "string", "(", "value", ",", "editor", ")", ";" ]
[ "process", "the", "given", "form", "field", "through", "a", "{" ]
[ "request", "data", "value", "processor", "processor", "=", "get", "request", "context", "(", ")", "get", "request", "data", "value", "processor", "(", ")", ";", "servlet", "request", "request", "=", "this", "page", "context", "get", "request", "(", ")", ";", "if", "(", "processor", "!", "=", "null", "&", "&", "request", "instanceof", "http", "servlet", "request", ")", "{", "value", "=", "processor", "process", "form", "field", "value", "(", "(", "http", "servlet", "request", ")", "request", ",", "name", ",", "value", ",", "type", ")", ";", "}", "return", "value", ";" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "no", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "error", "message", "args", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ",", "p", "3", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "expression", "}", "is", "{", "@", "code", "true", "}", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "if", "(", "!", "expression", ")", "{", "throw", "new", "verify", "exception", "(", "lenient", "format", "(", "error", "message", "template", ",", "p", "1", ",", "p", "2", ",", "p", "3", ",", "p", "4", ")", ")", ";", "}" ]
[ "ensures", "that", "{", "@", "code", "reference", "}", "is", "non", "-", "null", "throwing", "a", "{", "@", "code", "verify", "exception", "}", "with", "a", "custom", "message", "otherwise" ]
[ "verify", "(", "reference", "!", "=", "null", ",", "error", "message", "template", ",", "error", "message", "args", ")", ";", "return", "reference", ";" ]
[ "gets", "the", "wrapped", "date", "time", "field" ]
[ "return", "i", "field", ";" ]
[ "register", "listener", "for", "when", "cursor", "refreshes" ]
[ "synchronized", "(", "cursor", "refresh", "listener", "set", ")", "{", "cursor", "refresh", "listener", "set", "add", "(", "on", "cursor", "refresh", "listener", ")", ";", "}" ]
[ "sets", "this", "list", "to", "cache", "models", "if", "set", "to", "false", "it", "will", "immediately", "clear", "the", "cache", "for", "you" ]
[ "this", "cache", "models", "=", "cache", "models", ";", "if", "(", "!", "cache", "models", ")", "{", "clear", "cache", "(", ")", ";", "}" ]
[ "clears", "the", "{" ]
[ "if", "(", "cache", "models", ")", "{", "model", "cache", "clear", "(", ")", ";", "}" ]
[ "returns", "a", "model", "at", "the", "specified", "position", "if", "we", "are", "using", "the", "cache", "and", "it", "does", "not", "contain", "a", "model", "at", "that", "position", "we", "move", "the", "cursor", "to", "the", "specified", "position", "and", "construct", "the", "{", "@", "link", "t", "model", "}" ]
[ "throw", "if", "cursor", "closed", "(", ")", ";", "warn", "empty", "cursor", "(", ")", ";", "t", "model", "model", "=", "null", ";", "if", "(", "cache", "models", ")", "{", "model", "=", "model", "cache", "get", "(", "position", ")", ";", "if", "(", "model", "=", "=", "null", "&", "&", "cursor", "!", "=", "null", "&", "&", "cursor", "move", "to", "position", "(", "(", "int", ")", "position", ")", ")", "{", "model", "=", "instance", "adapter", "get", "single", "model", "loader", "(", ")", "convert", "to", "data", "(", "cursor", ",", "null", ",", "false", ")", ";", "model", "cache", "add", "model", "(", "position", ",", "model", ")", ";", "}", "}", "else", "if", "(", "cursor", "!", "=", "null", "&", "&", "cursor", "move", "to", "position", "(", "(", "int", ")", "position", ")", ")", "{", "model", "=", "instance", "adapter", "get", "single", "model", "loader", "(", ")", "convert", "to", "data", "(", "cursor", ",", "null", ",", "false", ")", ";", "}", "return", "model", ";" ]
[ "closes", "the", "cursor", "backed", "by", "this", "list" ]
[ "warn", "empty", "cursor", "(", ")", ";", "if", "(", "cursor", "!", "=", "null", ")", "{", "cursor", "close", "(", ")", ";", "}", "cursor", "=", "null", ";" ]
[ "<", "p", ">", "the", "work", "spaces", "to", "reboot", "you", "can", "specify", "up", "to", "25", "work", "spaces", "<", "/", "p", ">" ]
[ "if", "(", "reboot", "workspace", "requests", "=", "=", "null", ")", "{", "reboot", "workspace", "requests", "=", "new", "com", "amazonaws", "internal", "sdk", "internal", "list", "<", "reboot", "request", ">", "(", ")", ";", "}", "return", "reboot", "workspace", "requests", ";" ]
[ "<", "p", ">", "the", "work", "spaces", "to", "reboot", "you", "can", "specify", "up", "to", "25", "work", "spaces", "<", "/", "p", ">" ]
[ "if", "(", "reboot", "workspace", "requests", "=", "=", "null", ")", "{", "this", "reboot", "workspace", "requests", "=", "null", ";", "return", ";", "}", "this", "reboot", "workspace", "requests", "=", "new", "com", "amazonaws", "internal", "sdk", "internal", "list", "<", "reboot", "request", ">", "(", "reboot", "workspace", "requests", ")", ";" ]
[ "<", "p", ">", "the", "work", "spaces", "to", "reboot", "you", "can", "specify", "up", "to", "25", "work", "spaces", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "note", ":", "<", "/", "b", ">", "this", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")", "use", "{", "@", "link", "#", "set", "reboot", "workspace", "requests", "(", "java", "util", "collection", ")", "}", "or", "{", "@", "link", "#", "with", "reboot", "workspace", "requests", "(", "java", "util", "collection", ")", "}", "if", "you", "want", "to", "override", "the", "existing", "values", "<", "/", "p", ">" ]
[ "if", "(", "this", "reboot", "workspace", "requests", "=", "=", "null", ")", "{", "set", "reboot", "workspace", "requests", "(", "new", "com", "amazonaws", "internal", "sdk", "internal", "list", "<", "reboot", "request", ">", "(", "reboot", "workspace", "requests", "length", ")", ")", ";", "}", "for", "(", "reboot", "request", "ele", ":", "reboot", "workspace", "requests", ")", "{", "this", "reboot", "workspace", "requests", "add", "(", "ele", ")", ";", "}", "return", "this", ";" ]
[ "<", "p", ">", "the", "work", "spaces", "to", "reboot", "you", "can", "specify", "up", "to", "25", "work", "spaces", "<", "/", "p", ">" ]
[ "set", "reboot", "workspace", "requests", "(", "reboot", "workspace", "requests", ")", ";", "return", "this", ";" ]
[ "returns", "the", "alias", "filter", "{" ]
[ "return", "filter", ";" ]
[ "recycler", "adapter", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", "<" ]
[ "final", "bv", "bv", "=", "create", "view", "(", "view", "type", ",", "parent", ")", ";", "bv", "create", "view", "(", ")", ";", "bv", "set", "on", "view", "click", "listener", "(", "on", "view", "click", "listener", ")", ";", "bv", "item", "view", "set", "on", "click", "listener", "(", "new", "view", "on", "click", "listener", "(", ")", "{", "@", "override", "public", "void", "on", "click", "(", "view", "v", ")", "{", "if", "(", "on", "item", "click", "listener", "!", "=", "null", ")", "{", "adapter", "view", "pv", "=", "parent", "instanceof", "adapter", "view", "?", "(", "adapter", "view", ")", "parent", ":", "null", ";", "on", "item", "click", "listener", "on", "item", "click", "(", "pv", ",", "v", ",", "bv", "position", ",", "get", "item", "id", "(", "bv", "position", ")", ")", ";", "}", "}", "}", ")", ";", "bv", "item", "view", "set", "on", "long", "click", "listener", "(", "new", "view", "on", "long", "click", "listener", "(", ")", "{", "@", "override", "public", "boolean", "on", "long", "click", "(", "view", "v", ")", "{", "if", "(", "on", "item", "long", "click", "listener", "=", "=", "null", ")", "{", "return", "false", ";", "}", "adapter", "view", "pv", "=", "parent", "instanceof", "adapter", "view", "?", "(", "adapter", "view", ")", "parent", ":", "null", ";", "return", "on", "item", "long", "click", "listener", "on", "item", "long", "click", "(", "pv", ",", "v", ",", "bv", "position", ",", "get", "item", "id", "(", "bv", "position", ")", ")", ";", "}", "}", ")", ";", "return", "bv", ";" ]
[ "returns", "true", "if", "the", "batch", "was", "added", "at", "the", "head" ]
[ "int", "index", "=", "collections", "binary", "search", "(", "list", ",", "new", "batch", ",", "s", "batch", "order", ")", ";", "if", "(", "index", "<", "0", ")", "{", "index", "=", "0", "-", "index", "-", "1", ";", "}", "list", "add", "(", "index", ",", "new", "batch", ")", ";", "return", "(", "index", "=", "=", "0", ")", ";" ]
[ "return", "the", "index", "of", "the", "matching", "batch", "or", "-", "1", "if", "none", "found" ]
[ "final", "int", "n", "=", "m", "alarm", "batches", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "n", ";", "i", "+", "+", ")", "{", "batch", "b", "=", "m", "alarm", "batches", "get", "(", "i", ")", ";", "if", "(", "(", "b", "flags", "&", "alarm", "manager", "flag", "standalone", ")", "=", "=", "0", "&", "&", "b", "can", "hold", "(", "when", "elapsed", ",", "max", "when", ")", ")", "{", "return", "i", ";", "}", "}", "return", "-", "1", ";" ]
[ "the", "rtc", "clock", "has", "moved", "arbitrarily", "so", "we", "need", "to", "recalculate", "all", "the", "batching" ]
[ "synchronized", "(", "m", "lock", ")", "{", "rebatch", "all", "alarms", "locked", "(", "true", ")", ";", "}" ]
[ "re", "-", "orders", "the", "alarm", "batches", "based", "on", "newly", "evaluated", "send", "times", "based", "on", "the", "current", "app", "-", "standby", "buckets" ]
[ "final", "long", "start", "=", "m", "stat", "logger", "get", "time", "(", ")", ";", "final", "array", "list", "<", "alarm", ">", "rescheduled", "alarms", "=", "new", "array", "list", "<", ">", "(", ")", ";", "for", "(", "int", "batch", "index", "=", "m", "alarm", "batches", "size", "(", ")", "-", "1", ";", "batch", "index", ">", "=", "0", ";", "batch", "index", "-", "-", ")", "{", "final", "batch", "batch", "=", "m", "alarm", "batches", "get", "(", "batch", "index", ")", ";", "for", "(", "int", "alarm", "index", "=", "batch", "size", "(", ")", "-", "1", ";", "alarm", "index", ">", "=", "0", ";", "alarm", "index", "-", "-", ")", "{", "final", "alarm", "alarm", "=", "batch", "get", "(", "alarm", "index", ")", ";", "final", "pair", "<", "string", ",", "integer", ">", "package", "user", "=", "pair", "create", "(", "alarm", "source", "package", ",", "user", "handle", "get", "user", "id", "(", "alarm", "creator", "uid", ")", ")", ";", "if", "(", "target", "packages", "!", "=", "null", "&", "&", "!", "target", "packages", "contains", "(", "package", "user", ")", ")", "{", "continue", ";", "}", "if", "(", "adjust", "delivery", "time", "based", "on", "standby", "bucket", "locked", "(", "alarm", ")", ")", "{", "batch", "remove", "(", "alarm", ")", ";", "rescheduled", "alarms", "add", "(", "alarm", ")", ";", "}", "}", "if", "(", "batch", "size", "(", ")", "=", "=", "0", ")", "{", "m", "alarm", "batches", "remove", "(", "batch", "index", ")", ";", "}", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "rescheduled", "alarms", "size", "(", ")", ";", "i", "+", "+", ")", "{", "final", "alarm", "a", "=", "rescheduled", "alarms", "get", "(", "i", ")", ";", "insert", "and", "batch", "alarm", "locked", "(", "a", ")", ";", "}", "m", "stat", "logger", "log", "duration", "stat", "(", "stats", "reorder", "alarms", "for", "standby", ",", "start", ")", ";", "return", "rescheduled", "alarms", "size", "(", ")", ">", "0", ";" ]
[ "check", "all", "alarms", "in", "{", "@", "link", "#", "m", "pending", "background", "alarms", "}", "and", "send", "the", "ones", "that", "are", "not", "restricted" ]
[ "final", "array", "list", "<", "alarm", ">", "alarms", "to", "deliver", "=", "new", "array", "list", "<", ">", "(", ")", ";", "find", "all", "unrestricted", "pending", "background", "alarms", "locked", "inner", "(", "m", "pending", "background", "alarms", ",", "alarms", "to", "deliver", ",", "this", ":", ":", "is", "background", "restricted", ")", ";", "if", "(", "alarms", "to", "deliver", "size", "(", ")", ">", "0", ")", "{", "deliver", "pending", "background", "alarms", "locked", "(", "alarms", "to", "deliver", ",", "system", "clock", "elapsed", "realtime", "(", ")", ")", ";", "}" ]
[ "updates", "next", "alarm", "formatted", "and", "sends", "next", "alarm", "clock", "changed", "intent", "for", "all", "users", "for", "which", "alarm", "clocks", "have", "changed", "since", "the", "last", "call", "to", "this" ]
[ "sparse", "array", "<", "alarm", "manager", "alarm", "clock", "info", ">", "pending", "users", "=", "m", "handler", "sparse", "alarm", "clock", "array", ";", "pending", "users", "clear", "(", ")", ";", "synchronized", "(", "m", "lock", ")", "{", "final", "int", "n", "=", "m", "pending", "send", "next", "alarm", "clock", "changed", "for", "user", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "n", ";", "i", "+", "+", ")", "{", "int", "user", "id", "=", "m", "pending", "send", "next", "alarm", "clock", "changed", "for", "user", "key", "at", "(", "i", ")", ";", "pending", "users", "append", "(", "user", "id", ",", "m", "next", "alarm", "clock", "for", "user", "get", "(", "user", "id", ")", ")", ";", "}", "m", "pending", "send", "next", "alarm", "clock", "changed", "for", "user", "clear", "(", ")", ";", "}", "final", "int", "n", "=", "pending", "users", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "n", ";", "i", "+", "+", ")", "{", "int", "user", "id", "=", "pending", "users", "key", "at", "(", "i", ")", ";", "alarm", "manager", "alarm", "clock", "info", "alarm", "clock", "=", "pending", "users", "value", "at", "(", "i", ")", ";", "settings", "system", "put", "string", "for", "user", "(", "get", "context", "(", ")", "get", "content", "resolver", "(", ")", ",", "settings", "system", "next", "alarm", "formatted", ",", "format", "next", "alarm", "(", "get", "context", "(", ")", ",", "alarm", "clock", ",", "user", "id", ")", ",", "user", "id", ")", ";", "get", "context", "(", ")", "send", "broadcast", "as", "user", "(", "next", "alarm", "clock", "changed", "intent", ",", "new", "user", "handle", "(", "user", "id", ")", ")", ";", "}" ]
[ "returns", "true", "if", "either", "matches" ]
[ "return", "(", "operation", "!", "=", "null", ")", "?", "operation", "equals", "(", "pi", ")", ":", "rec", "!", "=", "null", "&", "&", "listener", "as", "binder", "(", ")", "equals", "(", "rec", "as", "binder", "(", ")", ")", ";" ]
[ "callback", "that", "arrives", "when", "a", "pending", "intent", "alarm", "has", "finished", "delivery" ]
[ "synchronized", "(", "m", "lock", ")", "{", "m", "send", "finish", "count", "+", "+", ";", "update", "tracking", "locked", "(", "remove", "locked", "(", "pi", ",", "intent", ")", ")", ";", "}" ]
[ "<", "p", ">", "boolean", "value", "that", "indicates", "whether", "the", "face", "is", "smiling", "or", "not", "<", "/", "p", ">" ]
[ "set", "value", "(", "value", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "level", "of", "confidence", "in", "the", "determination", "<", "/", "p", ">" ]
[ "set", "confidence", "(", "confidence", ")", ";", "return", "this", ";" ]
[ "returns", "a", "digest", "of", "the", "content", "of", "the", "underlying", "file", "system", "object", ";", "must", "always", "return", "a", "non", "-", "null", "value", "for", "instances", "of", "type", "{", "@", "link", "file", "state", "type", "#", "regular", "file", "}", "otherwise", "may", "return", "null" ]
[ "@", "nullable", "public", "abstract", "byte", "[", "]", "get", "digest", "(", ")", ";" ]
[ "returns", "the", "last", "modified", "time", ";", "see", "the", "documentation", "of", "{" ]
[ "public", "abstract", "long", "get", "modified", "time", "(", ")", ";" ]
[ "index", "used", "to", "resolve", "remote", "files" ]
[ "return", "0", ";" ]
[ "returns", "{" ]
[ "return", "this", "instanceof", "singleton", ";" ]
[ "provides", "a", "best", "-", "effort", "determination", "whether", "the", "file", "was", "changed", "since", "the", "digest", "was", "computed", "this", "method", "performs", "file", "system", "i", "/", "o", "so", "may", "be", "expensive", "it", "s", "primarily", "intended", "to", "avoid", "storing", "bad", "cache", "entries", "in", "an", "action", "cache", "it", "should", "return", "true", "if", "there", "is", "a", "chance", "that", "the", "file", "was", "modified", "since", "the", "digest", "was", "computed", "better", "not", "upload", "if", "we", "are", "not", "sure", "that", "the", "cache", "entry", "is", "reliable" ]
[ "public", "abstract", "boolean", "was", "modified", "since", "digest", "(", "path", "path", ")", "throws", "i", "o", "exception", ";" ]
[ "<", "p", ">", "the", "client", "-", "specific", "data", "<", "/", "p", ">" ]
[ "set", "client", "data", "(", "client", "data", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "token", "to", "enable", "idempotency", "for", "vm", "import", "requests", "<", "/", "p", ">" ]
[ "set", "client", "token", "(", "client", "token", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "the", "description", "string", "for", "the", "import", "snapshot", "task", "<", "/", "p", ">" ]
[ "set", "description", "(", "description", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "information", "about", "the", "disk", "container", "<", "/", "p", ">" ]
[ "this", "disk", "container", "=", "disk", "container", ";" ]