docstring_tokens
list | code_tokens
list |
---|---|
[
"returns",
"the",
"number",
"of",
"queue",
"items",
"contained",
"on",
"this",
"backup",
"replica",
"a",
"transaction",
"might",
"temporarily",
"reserve",
"a",
"poll",
"operation",
"by",
"removing",
"an",
"item",
"from",
"this",
"map",
"if",
"the",
"transaction",
"is",
"committed",
"the",
"map",
"will",
"remain",
"the",
"same",
"if",
"the",
"transaction",
"is",
"aborted",
"the",
"item",
"is",
"returned",
"to",
"the",
"map"
]
| [
"return",
"get",
"backup",
"map",
"(",
")",
"size",
"(",
")",
";"
]
|
[
"removes",
"a",
"queue",
"item",
"from",
"the",
"backup",
"map",
"this",
"should",
"be",
"executed",
"on",
"the",
"backup",
"replica"
]
| [
"get",
"backup",
"map",
"(",
")",
"remove",
"(",
"item",
"id",
")",
";"
]
|
[
"checks",
"if",
"the",
"queue",
"contains",
"all",
"items",
"in",
"the",
"data",
"set",
"this",
"method",
"does",
"not",
"trigger",
"store",
"load"
]
| [
"for",
"(",
"data",
"data",
":",
"data",
"set",
")",
"{",
"boolean",
"contains",
"=",
"false",
";",
"for",
"(",
"queue",
"item",
"item",
":",
"get",
"item",
"queue",
"(",
")",
")",
"{",
"if",
"(",
"item",
"get",
"data",
"(",
")",
"!",
"=",
"null",
"&",
"&",
"item",
"get",
"data",
"(",
")",
"equals",
"(",
"data",
")",
")",
"{",
"contains",
"=",
"true",
";",
"break",
";",
"}",
"}",
"if",
"(",
"!",
"contains",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";"
]
|
[
"returns",
"data",
"in",
"the",
"queue",
"this",
"method",
"triggers",
"store",
"load"
]
| [
"list",
"<",
"data",
">",
"data",
"list",
"=",
"new",
"array",
"list",
"<",
"data",
">",
"(",
"get",
"item",
"queue",
"(",
")",
"size",
"(",
")",
")",
";",
"for",
"(",
"queue",
"item",
"item",
":",
"get",
"item",
"queue",
"(",
")",
")",
"{",
"if",
"(",
"store",
"is",
"enabled",
"(",
")",
"&",
"&",
"item",
"get",
"data",
"(",
")",
"=",
"=",
"null",
")",
"{",
"try",
"{",
"load",
"(",
"item",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"new",
"hazelcast",
"exception",
"(",
"e",
")",
";",
"}",
"}",
"data",
"list",
"add",
"(",
"item",
"get",
"data",
"(",
")",
")",
";",
"}",
"return",
"data",
"list",
";"
]
|
[
"compares",
"if",
"the",
"queue",
"contains",
"the",
"items",
"in",
"the",
"data",
"list",
"and",
"removes",
"them",
"according",
"to",
"the",
"retain",
"parameter",
"if",
"the",
"retain",
"parameter",
"is",
"true",
"it",
"will",
"remove",
"items",
"which",
"are",
"not",
"in",
"the",
"data",
"list",
"(",
"retaining",
"the",
"items",
"which",
"are",
"in",
"the",
"list",
")",
"if",
"the",
"retain",
"parameter",
"is",
"false",
"it",
"will",
"remove",
"items",
"which",
"are",
"in",
"the",
"data",
"list",
"(",
"retaining",
"all",
"other",
"items",
"which",
"are",
"not",
"in",
"the",
"list",
")",
"<",
"p",
">",
"note",
":",
"this",
"method",
"will",
"trigger",
"store",
"load"
]
| [
"linked",
"hash",
"map",
"<",
"long",
",",
"data",
">",
"map",
"=",
"new",
"linked",
"hash",
"map",
"<",
"long",
",",
"data",
">",
"(",
")",
";",
"for",
"(",
"queue",
"item",
"item",
":",
"get",
"item",
"queue",
"(",
")",
")",
"{",
"if",
"(",
"item",
"get",
"data",
"(",
")",
"=",
"=",
"null",
"&",
"&",
"store",
"is",
"enabled",
"(",
")",
")",
"{",
"try",
"{",
"load",
"(",
"item",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"new",
"hazelcast",
"exception",
"(",
"e",
")",
";",
"}",
"}",
"boolean",
"contains",
"=",
"data",
"list",
"contains",
"(",
"item",
"get",
"data",
"(",
")",
")",
";",
"if",
"(",
"(",
"retain",
"&",
"&",
"!",
"contains",
")",
"|",
"|",
"(",
"!",
"retain",
"&",
"&",
"contains",
")",
")",
"{",
"map",
"put",
"(",
"item",
"get",
"item",
"id",
"(",
")",
",",
"item",
"get",
"data",
"(",
")",
")",
";",
"}",
"}",
"map",
"iterate",
"and",
"remove",
"(",
"map",
")",
";",
"return",
"map",
";"
]
|
[
"tries",
"to",
"load",
"the",
"data",
"for",
"the",
"given",
"queue",
"item",
"the",
"method",
"will",
"also",
"try",
"to",
"load",
"data",
"in",
"batches",
"if",
"configured",
"to",
"do",
"so",
"<",
"p",
">",
"if",
"the",
"{",
"@",
"link",
"queue",
"store",
"wrapper",
"#",
"get",
"bulk",
"load",
"(",
")",
"}",
"is",
"1",
"it",
"will",
"just",
"load",
"data",
"for",
"the",
"given",
"item",
"otherwise",
"it",
"will",
"load",
"items",
"for",
"other",
"items",
"in",
"the",
"queue",
"too",
"by",
"collecting",
"the",
"i",
"ds",
"of",
"the",
"items",
"in",
"the",
"queue",
"sequentially",
"up",
"to",
"{",
"@",
"link",
"queue",
"store",
"wrapper",
"#",
"get",
"bulk",
"load",
"(",
")",
"}",
"items",
"while",
"doing",
"so",
"it",
"will",
"make",
"sure",
"that",
"the",
"id",
"of",
"the",
"initially",
"requested",
"item",
"is",
"also",
"being",
"loaded",
"even",
"though",
"it",
"is",
"not",
"amongst",
"the",
"first",
"{",
"@",
"link",
"queue",
"store",
"wrapper",
"#",
"get",
"bulk",
"load",
"(",
")",
"}",
"items",
"in",
"the",
"queue"
]
| [
"int",
"bulk",
"load",
"=",
"store",
"get",
"bulk",
"load",
"(",
")",
";",
"bulk",
"load",
"=",
"math",
"min",
"(",
"get",
"item",
"queue",
"(",
")",
"size",
"(",
")",
",",
"bulk",
"load",
")",
";",
"if",
"(",
"bulk",
"load",
"=",
"=",
"1",
")",
"{",
"item",
"set",
"data",
"(",
"store",
"load",
"(",
"item",
"get",
"item",
"id",
"(",
")",
")",
")",
";",
"}",
"else",
"if",
"(",
"bulk",
"load",
">",
"1",
")",
"{",
"long",
"max",
"id",
"to",
"load",
"=",
"-",
"1",
";",
"iterator",
"<",
"queue",
"item",
">",
"iterator",
"=",
"get",
"item",
"queue",
"(",
")",
"iterator",
"(",
")",
";",
"set",
"<",
"long",
">",
"key",
"set",
"=",
"create",
"hash",
"set",
"(",
"bulk",
"load",
")",
";",
"key",
"set",
"add",
"(",
"item",
"get",
"item",
"id",
"(",
")",
")",
";",
"while",
"(",
"key",
"set",
"size",
"(",
")",
"<",
"bulk",
"load",
"&",
"&",
"iterator",
"has",
"next",
"(",
")",
")",
"{",
"long",
"item",
"id",
"=",
"iterator",
"next",
"(",
")",
"get",
"item",
"id",
"(",
")",
";",
"if",
"(",
"item",
"id",
">",
"last",
"id",
"loaded",
")",
"{",
"key",
"set",
"add",
"(",
"item",
"id",
")",
";",
"max",
"id",
"to",
"load",
"=",
"math",
"max",
"(",
"item",
"id",
",",
"max",
"id",
"to",
"load",
")",
";",
"}",
"}",
"map",
"<",
"long",
",",
"data",
">",
"values",
"=",
"store",
"load",
"all",
"(",
"key",
"set",
")",
";",
"last",
"id",
"loaded",
"=",
"max",
"id",
"to",
"load",
";",
"data",
"map",
"put",
"all",
"(",
"values",
")",
";",
"item",
"set",
"data",
"(",
"get",
"data",
"from",
"map",
"(",
"item",
"get",
"item",
"id",
"(",
")",
")",
")",
";",
"}"
]
|
[
"returns",
"if",
"this",
"queue",
"can",
"accommodate",
"one",
"item"
]
| [
"return",
"has",
"enough",
"capacity",
"(",
"1",
")",
";"
]
|
[
"returns",
"if",
"this",
"queue",
"can",
"accommodate",
"for",
"{",
"@",
"code",
"delta",
"}",
"items"
]
| [
"return",
"(",
"get",
"item",
"queue",
"(",
")",
"size",
"(",
")",
"+",
"delta",
")",
"<",
"=",
"config",
"get",
"max",
"size",
"(",
")",
";"
]
|
[
"returns",
"the",
"item",
"queue",
"on",
"the",
"partition",
"owner",
"this",
"method",
"will",
"also",
"move",
"the",
"items",
"from",
"the",
"backup",
"map",
"if",
"this",
"member",
"has",
"been",
"promoted",
"from",
"a",
"backup",
"replica",
"to",
"the",
"partition",
"owner",
"and",
"clear",
"the",
"backup",
"map"
]
| [
"if",
"(",
"item",
"queue",
"=",
"=",
"null",
")",
"{",
"item",
"queue",
"=",
"new",
"linked",
"list",
"<",
"queue",
"item",
">",
"(",
")",
";",
"if",
"(",
"backup",
"map",
"!",
"=",
"null",
"&",
"&",
"!",
"backup",
"map",
"is",
"empty",
"(",
")",
")",
"{",
"list",
"<",
"queue",
"item",
">",
"values",
"=",
"new",
"array",
"list",
"<",
"queue",
"item",
">",
"(",
"backup",
"map",
"values",
"(",
")",
")",
";",
"collections",
"sort",
"(",
"values",
")",
";",
"item",
"queue",
"add",
"all",
"(",
"values",
")",
";",
"queue",
"item",
"last",
"item",
"=",
"item",
"queue",
"peek",
"last",
"(",
")",
";",
"if",
"(",
"last",
"item",
"!",
"=",
"null",
")",
"{",
"set",
"id",
"(",
"last",
"item",
"item",
"id",
"+",
"id",
"promotion",
"offset",
")",
";",
"}",
"backup",
"map",
"clear",
"(",
")",
";",
"backup",
"map",
"=",
"null",
";",
"}",
"}",
"return",
"item",
"queue",
";"
]
|
[
"return",
"the",
"map",
"containing",
"queue",
"items",
"when",
"this",
"instance",
"is",
"a",
"backup",
"replica",
"the",
"map",
"contains",
"both",
"items",
"that",
"are",
"parts",
"of",
"different",
"transactions",
"and",
"items",
"which",
"have",
"already",
"been",
"committed",
"to",
"the",
"queue"
]
| [
"if",
"(",
"backup",
"map",
"=",
"=",
"null",
")",
"{",
"if",
"(",
"item",
"queue",
"!",
"=",
"null",
")",
"{",
"backup",
"map",
"=",
"create",
"hash",
"map",
"(",
"item",
"queue",
"size",
"(",
")",
")",
";",
"for",
"(",
"queue",
"item",
"item",
":",
"item",
"queue",
")",
"{",
"backup",
"map",
"put",
"(",
"item",
"get",
"item",
"id",
"(",
")",
",",
"item",
")",
";",
"}",
"item",
"queue",
"clear",
"(",
")",
";",
"item",
"queue",
"=",
"null",
";",
"}",
"else",
"{",
"backup",
"map",
"=",
"new",
"hash",
"map",
"<",
"long",
",",
"queue",
"item",
">",
"(",
")",
";",
"}",
"}",
"return",
"backup",
"map",
";"
]
|
[
"returns",
"the",
"next",
"id",
"that",
"can",
"be",
"used",
"for",
"uniquely",
"identifying",
"queue",
"items"
]
| [
"return",
"+",
"+",
"id",
"generator",
";"
]
|
[
"schedules",
"the",
"queue",
"for",
"destruction",
"if",
"the",
"queue",
"is",
"empty",
"destroys",
"the",
"queue",
"immediately",
"the",
"queue",
"is",
"empty",
"and",
"the",
"{"
]
| [
"int",
"empty",
"queue",
"ttl",
"=",
"config",
"get",
"empty",
"queue",
"ttl",
"(",
")",
";",
"if",
"(",
"empty",
"queue",
"ttl",
"<",
"0",
")",
"{",
"return",
";",
"}",
"if",
"(",
"get",
"item",
"queue",
"(",
")",
"is",
"empty",
"(",
")",
"&",
"&",
"tx",
"map",
"is",
"empty",
"(",
")",
"&",
"&",
"!",
"is",
"eviction",
"scheduled",
")",
"{",
"if",
"(",
"empty",
"queue",
"ttl",
"=",
"=",
"0",
")",
"{",
"node",
"engine",
"get",
"proxy",
"service",
"(",
")",
"destroy",
"distributed",
"object",
"(",
"queue",
"service",
"service",
"name",
",",
"name",
")",
";",
"}",
"else",
"{",
"service",
"schedule",
"eviction",
"(",
"name",
",",
"time",
"unit",
"seconds",
"to",
"millis",
"(",
"empty",
"queue",
"ttl",
")",
")",
";",
"is",
"eviction",
"scheduled",
"=",
"true",
";",
"}",
"}"
]
|
[
"return",
"the",
"lock",
"id",
"of",
"the",
"waiter"
]
| [
"return",
"lock",
"id",
";"
]
|
[
"return",
"the",
"future",
"representing",
"the",
"waiting",
"result"
]
| [
"return",
"acquire",
"future",
";"
]
|
[
"returns",
"{"
]
| [
"long",
"now",
"=",
"ticker",
"nano",
"time",
"(",
")",
";",
"boolean",
"valid",
";",
"if",
"(",
"!",
"has",
"outstanding",
"calls",
"&",
"&",
"!",
"permit",
"without",
"calls",
")",
"{",
"valid",
"=",
"compare",
"nanos",
"(",
"last",
"valid",
"ping",
"time",
"+",
"implicit",
"permit",
"time",
"nanos",
",",
"now",
")",
"<",
"=",
"0",
";",
"}",
"else",
"{",
"valid",
"=",
"compare",
"nanos",
"(",
"last",
"valid",
"ping",
"time",
"+",
"min",
"time",
"nanos",
",",
"now",
")",
"<",
"=",
"0",
";",
"}",
"if",
"(",
"!",
"valid",
")",
"{",
"ping",
"strikes",
"+",
"+",
";",
"return",
"!",
"(",
"ping",
"strikes",
">",
"max",
"ping",
"strikes",
")",
";",
"}",
"else",
"{",
"last",
"valid",
"ping",
"time",
"=",
"now",
";",
"return",
"true",
";",
"}"
]
|
[
"reset",
"any",
"counters",
"because",
"p",
"i",
"n",
"gs",
"are",
"allowed",
"in",
"response",
"to",
"something",
"sent",
"typically",
"called",
"when",
"sending",
"headers",
"and",
"data",
"frames"
]
| [
"last",
"valid",
"ping",
"time",
"=",
"epoch",
";",
"ping",
"strikes",
"=",
"0",
";"
]
|
[
"there",
"are",
"outstanding",
"r",
"p",
"cs",
"on",
"the",
"transport"
]
| [
"has",
"outstanding",
"calls",
"=",
"true",
";"
]
|
[
"there",
"are",
"no",
"outstanding",
"r",
"p",
"cs",
"on",
"the",
"transport"
]
| [
"has",
"outstanding",
"calls",
"=",
"false",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"get",
"settings",
"error",
"name",
"from",
"enum",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"get",
"settings",
"error",
"name",
"from",
"enum",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"return",
"call",
"p",
"(",
"function",
"address",
",",
"e",
"error",
")",
";"
]
|
[
"unsafe",
"version",
"of",
":",
"{"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"sync",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"return",
"call",
"p",
"z",
"(",
"function",
"address",
",",
"b",
"force",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"set",
"bool",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"set",
"bool",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"call",
"p",
"p",
"p",
"v",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"b",
"value",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"set",
"int",
"3",
"2",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"set",
"int",
"3",
"2",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"call",
"p",
"p",
"p",
"v",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"n",
"value",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"set",
"float",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"set",
"float",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"call",
"p",
"p",
"p",
"v",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"fl",
"value",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"set",
"string",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"set",
"string",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"call",
"p",
"p",
"p",
"p",
"v",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"pch",
"value",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"get",
"bool",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"get",
"bool",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"return",
"call",
"p",
"p",
"p",
"z",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"get",
"int",
"3",
"2",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"get",
"int",
"3",
"2",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"return",
"call",
"p",
"p",
"p",
"i",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"get",
"float",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"get",
"float",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"return",
"call",
"p",
"p",
"p",
"f",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"get",
"string",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"get",
"string",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"call",
"p",
"p",
"p",
"p",
"v",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"pch",
"value",
",",
"un",
"value",
"len",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"remove",
"section",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"remove",
"section",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"call",
"p",
"p",
"v",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pe",
"error",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"v",
"r",
"settings",
"remove",
"key",
"in",
"section",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"open",
"v",
"r",
"v",
"r",
"settings",
"remove",
"key",
"in",
"section",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"}",
"call",
"p",
"p",
"p",
"v",
"(",
"function",
"address",
",",
"pch",
"section",
",",
"pch",
"settings",
"key",
",",
"pe",
"error",
")",
";"
]
|
[
"/",
"*",
"(",
"non",
"-",
"javadoc",
")"
]
| [
"super",
"set",
"properties",
"(",
"properties",
")",
";",
"(",
"(",
"c",
"p",
"p",
"tokenizer",
")",
"get",
"tokenizer",
"(",
")",
")",
"set",
"properties",
"(",
"properties",
")",
";"
]
|
[
"accepts",
"all",
"edges",
"that",
"are",
"either",
"forward",
"or",
"backward",
"for",
"the",
"given",
"flag",
"encoder",
"edges",
"where",
"neither",
"one",
"of",
"the",
"flags",
"is",
"enabled",
"will",
"still",
"not",
"be",
"accepted",
"if",
"you",
"need",
"to",
"retrieve",
"all",
"edges",
"regardless",
"of",
"their",
"encoding",
"use",
"{"
]
| [
"return",
"new",
"default",
"edge",
"filter",
"(",
"flag",
"encoder",
",",
"true",
",",
"true",
")",
";"
]
|
[
"restores",
"properties",
"contained",
"in",
"the",
"file",
"into",
"the",
"given",
"object"
]
| [
"optional",
"<",
"document",
">",
"odoc",
"=",
"get",
"document",
"(",
"file",
")",
";",
"odoc",
"flat",
"map",
"(",
"xml",
"format",
"revision",
":",
":",
"get",
"suitable",
"reader",
")",
"map",
"(",
"rev",
"-",
">",
"rev",
"xml",
"interface",
")",
"flat",
"map",
"(",
"xml",
"interface",
"-",
">",
"odoc",
"flat",
"map",
"(",
"xml",
"interface",
":",
":",
"parse",
"xml",
")",
")",
"if",
"present",
"(",
"n",
"-",
">",
"restore",
"settings",
"(",
"root",
",",
"n",
")",
")",
";"
]
|
[
"save",
"properties",
"of",
"this",
"object",
"and",
"descendants",
"into",
"the",
"given",
"file"
]
| [
"simple",
"bean",
"model",
"node",
"node",
"=",
"settings",
"persistence",
"util",
"build",
"settings",
"model",
"(",
"root",
")",
";",
"xml",
"format",
"revision",
"get",
"latest",
"(",
")",
"xml",
"interface",
"write",
"model",
"to",
"xml",
"(",
"file",
",",
"node",
")",
";"
]
|
[
"returns",
"an",
"xml",
"document",
"for",
"the",
"given",
"file",
"if",
"it",
"exists",
"and",
"can",
"be",
"parsed"
]
| [
"input",
"stream",
"stream",
"=",
"null",
";",
"if",
"(",
"file",
"exists",
"(",
")",
")",
"{",
"try",
"{",
"document",
"builder",
"builder",
"=",
"document",
"builder",
"factory",
"new",
"instance",
"(",
")",
"new",
"document",
"builder",
"(",
")",
";",
"stream",
"=",
"new",
"file",
"input",
"stream",
"(",
"file",
")",
";",
"document",
"document",
"=",
"builder",
"parse",
"(",
"stream",
")",
";",
"return",
"optional",
"of",
"(",
"document",
")",
";",
"}",
"catch",
"(",
"s",
"a",
"x",
"exception",
"|",
"parser",
"configuration",
"exception",
"|",
"i",
"o",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"}",
"finally",
"{",
"i",
"o",
"utils",
"close",
"quietly",
"(",
"stream",
")",
";",
"}",
"}",
"return",
"optional",
"empty",
"(",
")",
";"
]
|
[
"get",
"object",
"value",
"assigned",
"with",
"key"
]
| [
"if",
"(",
"key",
"<",
"0",
")",
"kit",
"code",
"bug",
"(",
")",
";",
"if",
"(",
"values",
"!",
"=",
"null",
")",
"{",
"int",
"index",
"=",
"find",
"index",
"(",
"key",
")",
";",
"if",
"(",
"0",
"<",
"=",
"index",
")",
"{",
"return",
"values",
"[",
"index",
"]",
";",
"}",
"}",
"return",
"null",
";"
]
|
[
"get",
"integer",
"value",
"assigned",
"with",
"key"
]
| [
"if",
"(",
"key",
"<",
"0",
")",
"kit",
"code",
"bug",
"(",
")",
";",
"int",
"index",
"=",
"find",
"index",
"(",
"key",
")",
";",
"if",
"(",
"0",
"<",
"=",
"index",
")",
"{",
"if",
"(",
"ivalues",
"shift",
"!",
"=",
"0",
")",
"{",
"return",
"keys",
"[",
"ivalues",
"shift",
"+",
"index",
"]",
";",
"}",
"return",
"0",
";",
"}",
"return",
"default",
"value",
";"
]
|
[
"set",
"object",
"value",
"of",
"the",
"key",
"if",
"key",
"does",
"not",
"exist",
"also",
"set",
"its",
"int",
"value",
"to",
"0"
]
| [
"if",
"(",
"key",
"<",
"0",
")",
"kit",
"code",
"bug",
"(",
")",
";",
"int",
"index",
"=",
"ensure",
"index",
"(",
"key",
",",
"false",
")",
";",
"if",
"(",
"values",
"=",
"=",
"null",
")",
"{",
"values",
"=",
"new",
"object",
"[",
"1",
"<",
"<",
"power",
"]",
";",
"}",
"values",
"[",
"index",
"]",
"=",
"value",
";"
]
|
[
"return",
"array",
"of",
"present",
"keys"
]
| [
"int",
"[",
"]",
"keys",
"=",
"this",
"keys",
";",
"int",
"n",
"=",
"key",
"count",
";",
"int",
"[",
"]",
"result",
"=",
"new",
"int",
"[",
"n",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"n",
"!",
"=",
"0",
";",
"+",
"+",
"i",
")",
"{",
"int",
"entry",
"=",
"keys",
"[",
"i",
"]",
";",
"if",
"(",
"entry",
"!",
"=",
"empty",
"&",
"&",
"entry",
"!",
"=",
"deleted",
")",
"{",
"result",
"[",
"-",
"-",
"n",
"]",
"=",
"entry",
";",
"}",
"}",
"return",
"result",
";"
]
|
[
"and",
"enough",
"free",
"space"
]
| [
"if",
"(",
"check",
"&",
"&",
"occupied",
"count",
"!",
"=",
"key",
"count",
")",
"kit",
"code",
"bug",
"(",
")",
";",
"if",
"(",
"check",
"&",
"&",
"key",
"count",
"=",
"=",
"1",
"<",
"<",
"power",
")",
"kit",
"code",
"bug",
"(",
")",
";",
"int",
"[",
"]",
"keys",
"=",
"this",
"keys",
";",
"int",
"fraction",
"=",
"key",
"*",
"a",
";",
"int",
"index",
"=",
"fraction",
">",
">",
">",
"(",
"32",
"-",
"power",
")",
";",
"if",
"(",
"keys",
"[",
"index",
"]",
"!",
"=",
"empty",
")",
"{",
"int",
"mask",
"=",
"(",
"1",
"<",
"<",
"power",
")",
"-",
"1",
";",
"int",
"step",
"=",
"table",
"lookup",
"step",
"(",
"fraction",
",",
"mask",
",",
"power",
")",
";",
"int",
"first",
"index",
"=",
"index",
";",
"do",
"{",
"if",
"(",
"check",
"&",
"&",
"keys",
"[",
"index",
"]",
"=",
"=",
"deleted",
")",
"kit",
"code",
"bug",
"(",
")",
";",
"index",
"=",
"(",
"index",
"+",
"step",
")",
"&",
"mask",
";",
"if",
"(",
"check",
"&",
"&",
"first",
"index",
"=",
"=",
"index",
")",
"kit",
"code",
"bug",
"(",
")",
";",
"}",
"while",
"(",
"keys",
"[",
"index",
"]",
"!",
"=",
"empty",
")",
";",
"}",
"keys",
"[",
"index",
"]",
"=",
"key",
";",
"+",
"+",
"occupied",
"count",
";",
"+",
"+",
"key",
"count",
";",
"return",
"index",
";"
]
|
[
"handle",
"the",
"frame",
"specific",
"to",
"the",
"draft"
]
| [
"public",
"abstract",
"void",
"process",
"frame",
"(",
"web",
"socket",
"impl",
"web",
"socket",
"impl",
",",
"framedata",
"frame",
")",
"throws",
"invalid",
"data",
"exception",
";"
]
|
[
"drafts",
"must",
"only",
"be",
"by",
"one",
"websocket",
"at",
"all",
"to",
"prevent",
"drafts",
"to",
"be",
"used",
"more",
"than",
"once",
"the",
"websocket",
"implementation",
"should",
"call",
"this",
"method",
"in",
"order",
"to",
"create",
"a",
"new",
"usable",
"version",
"of",
"a",
"given",
"draft",
"instance",
"<",
"br",
">",
"the",
"copy",
"can",
"be",
"safely",
"used",
"in",
"conjunction",
"with",
"a",
"new",
"websocket",
"connection"
]
| [
"public",
"abstract",
"draft",
"copy",
"instance",
"(",
")",
";"
]
|
[
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/"
]
| [
"return",
"new",
"array",
"list",
"<",
">",
"(",
"collections",
"singleton",
"list",
"(",
"capabilities",
"capability",
"ack",
"msg",
"ordinal",
"(",
")",
")",
")",
";"
]
|
[
"unbinds",
"the",
"activity",
"from",
"the",
"custom",
"tabs",
"service"
]
| [
"if",
"(",
"m",
"connection",
"=",
"=",
"null",
")",
"return",
";",
"activity",
"unbind",
"service",
"(",
"m",
"connection",
")",
";",
"m",
"client",
"=",
"null",
";",
"m",
"custom",
"tabs",
"session",
"=",
"null",
";"
]
|
[
"{"
]
| [
"return",
"update",
"model",
"(",
"null",
",",
"dataset",
"builder",
",",
"feature",
"extractor",
",",
"lb",
"extractor",
")",
";"
]
|
[
"{"
]
| [
"ignite",
"function",
"<",
"dataset",
"<",
"empty",
"context",
",",
"simple",
"labeled",
"dataset",
"data",
">",
",",
"m",
"l",
"p",
"architecture",
">",
"arch",
"supplier",
"=",
"dataset",
"-",
">",
"{",
"int",
"cols",
"=",
"dataset",
"compute",
"(",
"data",
"-",
">",
"{",
"if",
"(",
"data",
"get",
"features",
"(",
")",
"=",
"=",
"null",
")",
"return",
"null",
";",
"return",
"data",
"get",
"features",
"(",
")",
"length",
"/",
"data",
"get",
"rows",
"(",
")",
";",
"}",
",",
"(",
"a",
",",
"b",
")",
"-",
">",
"{",
"if",
"(",
"a",
"=",
"=",
"null",
")",
"return",
"b",
"=",
"=",
"null",
"?",
"0",
":",
"b",
";",
"if",
"(",
"b",
"=",
"=",
"null",
")",
"return",
"a",
";",
"return",
"b",
";",
"}",
")",
";",
"m",
"l",
"p",
"architecture",
"architecture",
"=",
"new",
"m",
"l",
"p",
"architecture",
"(",
"cols",
")",
";",
"architecture",
"=",
"architecture",
"with",
"added",
"layer",
"(",
"1",
",",
"true",
",",
"activators",
"sigmoid",
")",
";",
"return",
"architecture",
";",
"}",
";",
"m",
"l",
"p",
"trainer",
"<",
"?",
">",
"trainer",
"=",
"new",
"m",
"l",
"p",
"trainer",
"<",
">",
"(",
"arch",
"supplier",
",",
"loss",
"functions",
"l2",
",",
"updates",
"stgy",
",",
"max",
"iterations",
",",
"batch",
"size",
",",
"loc",
"iterations",
",",
"seed",
")",
";",
"ignite",
"bi",
"function",
"<",
"k",
",",
"v",
",",
"double",
"[",
"]",
">",
"lb",
"extractor",
"wrapper",
"=",
"(",
"k",
",",
"v",
")",
"-",
">",
"new",
"double",
"[",
"]",
"{",
"lb",
"extractor",
"apply",
"(",
"k",
",",
"v",
")",
"}",
";",
"multilayer",
"perceptron",
"mlp",
";",
"if",
"(",
"mdl",
"!",
"=",
"null",
")",
"{",
"mlp",
"=",
"restore",
"m",
"l",
"p",
"state",
"(",
"mdl",
")",
";",
"mlp",
"=",
"trainer",
"update",
"(",
"mlp",
",",
"dataset",
"builder",
",",
"feature",
"extractor",
",",
"lb",
"extractor",
"wrapper",
")",
";",
"}",
"else",
"mlp",
"=",
"trainer",
"fit",
"(",
"dataset",
"builder",
",",
"feature",
"extractor",
",",
"lb",
"extractor",
"wrapper",
")",
";",
"double",
"[",
"]",
"params",
"=",
"mlp",
"parameters",
"(",
")",
"get",
"storage",
"(",
")",
"data",
"(",
")",
";",
"return",
"new",
"logistic",
"regression",
"model",
"(",
"new",
"dense",
"vector",
"(",
"arrays",
"copy",
"of",
"(",
"params",
",",
"params",
"length",
"-",
"1",
")",
")",
",",
"params",
"[",
"params",
"length",
"-",
"1",
"]",
")",
";"
]
|
[
"{"
]
| [
"return",
"true",
";"
]
|
[
"set",
"up",
"the",
"max",
"amount",
"of",
"iterations",
"before",
"convergence"
]
| [
"this",
"max",
"iterations",
"=",
"max",
"iterations",
";",
"return",
"this",
";"
]
|
[
"set",
"up",
"the",
"batch",
"size",
"parameter"
]
| [
"this",
"batch",
"size",
"=",
"batch",
"size",
";",
"return",
"this",
";"
]
|
[
"set",
"up",
"the",
"amount",
"of",
"local",
"iterations",
"of",
"sgd",
"algorithm"
]
| [
"this",
"loc",
"iterations",
"=",
"amount",
"of",
"loc",
"iterations",
";",
"return",
"this",
";"
]
|
[
"set",
"up",
"the",
"random",
"seed",
"parameter"
]
| [
"this",
"seed",
"=",
"seed",
";",
"return",
"this",
";"
]
|
[
"set",
"up",
"the",
"regularization",
"parameter"
]
| [
"this",
"updates",
"stgy",
"=",
"updates",
"stgy",
";",
"return",
"this",
";"
]
|
[
"gets",
"the",
"{",
"@",
"link",
"permalink",
"}",
"by",
"its",
"{",
"@",
"link",
"permalink",
"#",
"get",
"id",
"(",
")",
"id",
"}"
]
| [
"for",
"(",
"permalink",
"p",
":",
"this",
")",
"if",
"(",
"p",
"get",
"id",
"(",
")",
"equals",
"(",
"id",
")",
")",
"return",
"p",
";",
"return",
"null",
";"
]
|
[
"finds",
"the",
"closest",
"name",
"match",
"by",
"its",
"id"
]
| [
"list",
"<",
"string",
">",
"ids",
"=",
"new",
"array",
"list",
"<",
"string",
">",
"(",
")",
";",
"for",
"(",
"permalink",
"p",
":",
"this",
")",
"ids",
"add",
"(",
"p",
"get",
"id",
"(",
")",
")",
";",
"string",
"nearest",
"=",
"edit",
"distance",
"find",
"nearest",
"(",
"id",
",",
"ids",
")",
";",
"if",
"(",
"nearest",
"=",
"=",
"null",
")",
"return",
"null",
";",
"return",
"get",
"(",
"nearest",
")",
";"
]
|
[
"check",
"whether",
"required",
"resource",
"profile",
"can",
"be",
"matched",
"by",
"this",
"slot"
]
| [
"return",
"resource",
"profile",
"is",
"matching",
"(",
"required",
")",
";"
]
|
[
"<",
"p",
">",
"the",
"name",
"of",
"the",
"stage",
"<",
"/",
"p",
">"
]
| [
"set",
"stage",
"name",
"(",
"stage",
"name",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"state",
"of",
"the",
"inbound",
"transition",
"which",
"is",
"either",
"enabled",
"or",
"disabled",
"<",
"/",
"p",
">"
]
| [
"this",
"inbound",
"transition",
"state",
"=",
"inbound",
"transition",
"state",
";"
]
|
[
"<",
"p",
">",
"the",
"state",
"of",
"the",
"inbound",
"transition",
"which",
"is",
"either",
"enabled",
"or",
"disabled",
"<",
"/",
"p",
">"
]
| [
"return",
"this",
"inbound",
"transition",
"state",
";"
]
|
[
"<",
"p",
">",
"the",
"state",
"of",
"the",
"inbound",
"transition",
"which",
"is",
"either",
"enabled",
"or",
"disabled",
"<",
"/",
"p",
">"
]
| [
"set",
"inbound",
"transition",
"state",
"(",
"inbound",
"transition",
"state",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"state",
"of",
"the",
"stage",
"<",
"/",
"p",
">"
]
| [
"return",
"action",
"states",
";"
]
|
[
"<",
"p",
">",
"the",
"state",
"of",
"the",
"stage",
"<",
"/",
"p",
">"
]
| [
"if",
"(",
"action",
"states",
"=",
"=",
"null",
")",
"{",
"this",
"action",
"states",
"=",
"null",
";",
"return",
";",
"}",
"this",
"action",
"states",
"=",
"new",
"java",
"util",
"array",
"list",
"<",
"action",
"state",
">",
"(",
"action",
"states",
")",
";"
]
|
[
"<",
"p",
">",
"the",
"state",
"of",
"the",
"stage",
"<",
"/",
"p",
">",
"<",
"p",
">",
"<",
"b",
">",
"note",
":",
"<",
"/",
"b",
">",
"this",
"method",
"appends",
"the",
"values",
"to",
"the",
"existing",
"list",
"(",
"if",
"any",
")",
"use",
"{",
"@",
"link",
"#",
"set",
"action",
"states",
"(",
"java",
"util",
"collection",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"with",
"action",
"states",
"(",
"java",
"util",
"collection",
")",
"}",
"if",
"you",
"want",
"to",
"override",
"the",
"existing",
"values",
"<",
"/",
"p",
">"
]
| [
"if",
"(",
"this",
"action",
"states",
"=",
"=",
"null",
")",
"{",
"set",
"action",
"states",
"(",
"new",
"java",
"util",
"array",
"list",
"<",
"action",
"state",
">",
"(",
"action",
"states",
"length",
")",
")",
";",
"}",
"for",
"(",
"action",
"state",
"ele",
":",
"action",
"states",
")",
"{",
"this",
"action",
"states",
"add",
"(",
"ele",
")",
";",
"}",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"state",
"of",
"the",
"stage",
"<",
"/",
"p",
">"
]
| [
"set",
"action",
"states",
"(",
"action",
"states",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"information",
"about",
"the",
"latest",
"execution",
"in",
"the",
"stage",
"including",
"its",
"id",
"and",
"status",
"<",
"/",
"p",
">"
]
| [
"this",
"latest",
"execution",
"=",
"latest",
"execution",
";"
]
|
[
"<",
"p",
">",
"information",
"about",
"the",
"latest",
"execution",
"in",
"the",
"stage",
"including",
"its",
"id",
"and",
"status",
"<",
"/",
"p",
">"
]
| [
"return",
"this",
"latest",
"execution",
";"
]
|
[
"<",
"p",
">",
"information",
"about",
"the",
"latest",
"execution",
"in",
"the",
"stage",
"including",
"its",
"id",
"and",
"status",
"<",
"/",
"p",
">"
]
| [
"set",
"latest",
"execution",
"(",
"latest",
"execution",
")",
";",
"return",
"this",
";"
]
|
[
"{"
]
| [
"return",
"math",
"pow",
"(",
"lb",
"-",
"prediction",
",",
"2",
")",
"/",
"sample",
"size",
";"
]
|
[
"{"
]
| [
"return",
"(",
"2",
"0",
"/",
"sample",
"size",
")",
"*",
"(",
"prediction",
"-",
"lb",
")",
";"
]
|
[
"calculating",
"wait",
"duration",
"after",
"failure",
"attempt"
]
| [
"long",
"max",
"delay",
"ret",
"=",
"min",
"delay",
"+",
"(",
"(",
"max",
"delay",
"-",
"min",
"delay",
")",
"/",
"max",
"failure",
"count",
")",
"*",
"current",
"failure",
"count",
";",
"return",
"(",
"long",
")",
"(",
"random",
"next",
"float",
"(",
")",
"*",
"max",
"delay",
"ret",
")",
";"
]
|
[
"notification",
"about",
"failure"
]
| [
"current",
"failure",
"count",
"+",
"+",
";",
"if",
"(",
"current",
"failure",
"count",
">",
"max",
"failure",
"count",
")",
"{",
"current",
"failure",
"count",
"=",
"max",
"failure",
"count",
";",
"}"
]
|
[
"notification",
"about",
"success"
]
| [
"reset",
"(",
")",
";"
]
|
[
"resetting",
"backoff",
"object"
]
| [
"current",
"failure",
"count",
"=",
"0",
";"
]
|
[
"dismiss",
"loading",
"dialog"
]
| [
"fragment",
"frag",
"=",
"get",
"support",
"fragment",
"manager",
"(",
")",
"find",
"fragment",
"by",
"tag",
"(",
"dialog",
"wait",
"tag",
")",
";",
"if",
"(",
"frag",
"!",
"=",
"null",
")",
"{",
"loading",
"dialog",
"loading",
"=",
"(",
"loading",
"dialog",
")",
"frag",
";",
"loading",
"dismiss",
"(",
")",
";",
"}"
]
|
[
"create",
"a",
"new",
"{"
]
| [
"return",
"new",
"builder",
"(",
")",
"merge",
"from",
"(",
"copy",
"from",
")",
";"
]
|
[
"get",
"an",
"empty",
"{"
]
| [
"return",
"default",
"instance",
";"
]
|
[
"get",
"a",
"map",
"of",
"fields",
"in",
"the",
"set",
"by",
"number"
]
| [
"return",
"fields",
";"
]
|
[
"check",
"if",
"the",
"given",
"field",
"number",
"is",
"present",
"in",
"the",
"set"
]
| [
"return",
"fields",
"contains",
"key",
"(",
"number",
")",
";"
]
|
[
"get",
"a",
"field",
"by",
"number",
"returns",
"an",
"empty",
"field",
"if",
"not",
"present",
"never",
"returns",
"{"
]
| [
"final",
"field",
"result",
"=",
"fields",
"get",
"(",
"number",
")",
";",
"return",
"(",
"result",
"=",
"=",
"null",
")",
"?",
"field",
"get",
"default",
"instance",
"(",
")",
":",
"result",
";"
]
|
[
"serializes",
"the",
"set",
"and",
"writes",
"it",
"to",
"{"
]
| [
"for",
"(",
"final",
"map",
"entry",
"<",
"integer",
",",
"field",
">",
"entry",
":",
"fields",
"entry",
"set",
"(",
")",
")",
"{",
"field",
"field",
"=",
"entry",
"get",
"value",
"(",
")",
";",
"field",
"write",
"to",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"output",
")",
";",
"}"
]
|
[
"serializes",
"the",
"message",
"and",
"writes",
"it",
"to",
"{"
]
| [
"final",
"coded",
"output",
"stream",
"coded",
"output",
"=",
"coded",
"output",
"stream",
"new",
"instance",
"(",
"output",
")",
";",
"write",
"to",
"(",
"coded",
"output",
")",
";",
"coded",
"output",
"flush",
"(",
")",
";"
]
|
[
"get",
"the",
"number",
"of",
"bytes",
"required",
"to",
"encode",
"this",
"set"
]
| [
"int",
"result",
"=",
"0",
";",
"for",
"(",
"final",
"map",
"entry",
"<",
"integer",
",",
"field",
">",
"entry",
":",
"fields",
"entry",
"set",
"(",
")",
")",
"{",
"result",
"+",
"=",
"entry",
"get",
"value",
"(",
")",
"get",
"serialized",
"size",
"(",
"entry",
"get",
"key",
"(",
")",
")",
";",
"}",
"return",
"result",
";"
]
|
[
"serializes",
"the",
"set",
"and",
"writes",
"it",
"to",
"{"
]
| [
"for",
"(",
"final",
"map",
"entry",
"<",
"integer",
",",
"field",
">",
"entry",
":",
"fields",
"entry",
"set",
"(",
")",
")",
"{",
"entry",
"get",
"value",
"(",
")",
"write",
"as",
"message",
"set",
"extension",
"to",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"output",
")",
";",
"}"
]
|
[
"get",
"the",
"number",
"of",
"bytes",
"required",
"to",
"encode",
"this",
"set",
"using",
"{"
]
| [
"int",
"result",
"=",
"0",
";",
"for",
"(",
"final",
"map",
"entry",
"<",
"integer",
",",
"field",
">",
"entry",
":",
"fields",
"entry",
"set",
"(",
")",
")",
"{",
"result",
"+",
"=",
"entry",
"get",
"value",
"(",
")",
"get",
"serialized",
"size",
"as",
"message",
"set",
"extension",
"(",
"entry",
"get",
"key",
"(",
")",
")",
";",
"}",
"return",
"result",
";"
]
|
[
"parse",
"an",
"{"
]
| [
"return",
"new",
"builder",
"(",
")",
"merge",
"from",
"(",
"input",
")",
"build",
"(",
")",
";"
]
|
[
"parse",
"{"
]
| [
"return",
"new",
"builder",
"(",
")",
"merge",
"from",
"(",
"data",
")",
"build",
"(",
")",
";"
]
|
[
"parse",
"{"
]
| [
"return",
"new",
"builder",
"(",
")",
"merge",
"from",
"(",
"data",
")",
"build",
"(",
")",
";"
]
|
[
"parse",
"an",
"{"
]
| [
"return",
"new",
"builder",
"(",
")",
"merge",
"from",
"(",
"input",
")",
"build",
"(",
")",
";"
]
|
[
"reset",
"the",
"builder",
"to",
"an",
"empty",
"set"
]
| [
"reinitialize",
"(",
")",
";",
"return",
"this",
";"
]
|
[
"merge",
"the",
"fields",
"from",
"{"
]
| [
"if",
"(",
"other",
"!",
"=",
"get",
"default",
"instance",
"(",
")",
")",
"{",
"for",
"(",
"final",
"map",
"entry",
"<",
"integer",
",",
"field",
">",
"entry",
":",
"other",
"fields",
"entry",
"set",
"(",
")",
")",
"{",
"merge",
"field",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
")",
";",
"}",
"}",
"return",
"this",
";"
]
|
[
"parse",
"an",
"entire",
"message",
"from",
"{"
]
| [
"while",
"(",
"true",
")",
"{",
"final",
"int",
"tag",
"=",
"input",
"read",
"tag",
"(",
")",
";",
"if",
"(",
"tag",
"=",
"=",
"0",
"|",
"|",
"!",
"merge",
"field",
"from",
"(",
"tag",
",",
"input",
")",
")",
"{",
"break",
";",
"}",
"}",
"return",
"this",
";"
]
|
[
"parse",
"a",
"single",
"field",
"from",
"{"
]
| [
"final",
"int",
"number",
"=",
"wire",
"format",
"get",
"tag",
"field",
"number",
"(",
"tag",
")",
";",
"switch",
"(",
"wire",
"format",
"get",
"tag",
"wire",
"type",
"(",
"tag",
")",
")",
"{",
"case",
"wire",
"format",
"wiretype",
"varint",
":",
"get",
"field",
"builder",
"(",
"number",
")",
"add",
"varint",
"(",
"input",
"read",
"int",
"6",
"4",
"(",
")",
")",
";",
"return",
"true",
";",
"case",
"wire",
"format",
"wiretype",
"fixed64",
":",
"get",
"field",
"builder",
"(",
"number",
")",
"add",
"fixed",
"6",
"4",
"(",
"input",
"read",
"fixed",
"6",
"4",
"(",
")",
")",
";",
"return",
"true",
";",
"case",
"wire",
"format",
"wiretype",
"length",
"delimited",
":",
"get",
"field",
"builder",
"(",
"number",
")",
"add",
"length",
"delimited",
"(",
"input",
"read",
"bytes",
"(",
")",
")",
";",
"return",
"true",
";",
"case",
"wire",
"format",
"wiretype",
"start",
"group",
":",
"final",
"builder",
"sub",
"builder",
"=",
"new",
"builder",
"(",
")",
";",
"input",
"read",
"group",
"(",
"number",
",",
"sub",
"builder",
",",
"extension",
"registry",
"get",
"empty",
"registry",
"(",
")",
")",
";",
"get",
"field",
"builder",
"(",
"number",
")",
"add",
"group",
"(",
"sub",
"builder",
"build",
"(",
")",
")",
";",
"return",
"true",
";",
"case",
"wire",
"format",
"wiretype",
"end",
"group",
":",
"return",
"false",
";",
"case",
"wire",
"format",
"wiretype",
"fixed32",
":",
"get",
"field",
"builder",
"(",
"number",
")",
"add",
"fixed",
"3",
"2",
"(",
"input",
"read",
"fixed",
"3",
"2",
"(",
")",
")",
";",
"return",
"true",
";",
"default",
":",
"throw",
"invalid",
"protocol",
"buffer",
"exception",
"invalid",
"wire",
"type",
"(",
")",
";",
"}"
]
|
[
"parse",
"an",
"{"
]
| [
"final",
"coded",
"input",
"stream",
"coded",
"input",
"=",
"coded",
"input",
"stream",
"new",
"instance",
"(",
"input",
")",
";",
"merge",
"from",
"(",
"coded",
"input",
")",
";",
"coded",
"input",
"check",
"last",
"tag",
"was",
"(",
"0",
")",
";",
"return",
"this",
";"
]
|
[
"construct",
"a",
"new",
"{"
]
| [
"return",
"new",
"builder",
"(",
")",
"merge",
"from",
"(",
"copy",
"from",
")",
";"
]
|
[
"get",
"an",
"empty",
"{"
]
| [
"return",
"field",
"default",
"instance",
";"
]
|
[
"get",
"the",
"list",
"of",
"varint",
"values",
"for",
"this",
"field"
]
| [
"return",
"varint",
";"
]
|
[
"get",
"the",
"list",
"of",
"fixed",
"3",
"2",
"values",
"for",
"this",
"field"
]
| [
"return",
"fixed",
"3",
"2",
";"
]
|
[
"get",
"the",
"list",
"of",
"fixed",
"6",
"4",
"values",
"for",
"this",
"field"
]
| [
"return",
"fixed",
"6",
"4",
";"
]
|
[
"get",
"the",
"list",
"of",
"length",
"-",
"delimited",
"values",
"for",
"this",
"field"
]
| [
"return",
"length",
"delimited",
";"
]
|
[
"get",
"the",
"list",
"of",
"embedded",
"group",
"values",
"for",
"this",
"field",
"these",
"are",
"represented",
"using",
"{"
]
| [
"return",
"group",
";"
]
|
[
"returns",
"the",
"array",
"of",
"objects",
"to",
"be",
"used",
"to",
"uniquely",
"identify",
"this",
"{"
]
| [
"return",
"new",
"object",
"[",
"]",
"{",
"varint",
",",
"fixed",
"3",
"2",
",",
"fixed",
"6",
"4",
",",
"length",
"delimited",
",",
"group",
"}",
";"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.