docstring_tokens
sequence | code_tokens
sequence |
---|---|
[
"override",
"this",
"to",
"control",
"time",
"based",
"decisions",
"during",
"delayed",
"allocation"
] | [
"protected",
"long",
"current",
"nano",
"time",
"(",
")",
"{",
"return",
"system",
"nano",
"time",
"(",
")",
";",
"}"
] |
[
"returns",
"the",
"serialized",
"form",
"of",
"the",
"label",
"of",
"the",
"specified",
"node"
] | [
"string",
"serialize",
"(",
"node",
"<",
"t",
">",
"node",
")",
";"
] |
[
"capture",
"local",
"nn",
"'",
"s",
"thread",
"dump",
"and",
"write",
"it",
"to",
"zkfc",
"'",
"s",
"log"
] | [
"private",
"void",
"get",
"local",
"n",
"n",
"thread",
"dump",
"(",
")",
"{",
"is",
"thread",
"dump",
"captured",
"=",
"false",
";",
"/",
"/",
"we",
"use",
"the",
"same",
"timeout",
"value",
"for",
"both",
"connection",
"establishment",
"/",
"/",
"timeout",
"and",
"read",
"timeout",
"int",
"http",
"time",
"out",
"=",
"conf",
"get",
"int",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"ha",
"zkfc",
"nn",
"http",
"timeout",
"key",
",",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"ha",
"zkfc",
"nn",
"http",
"timeout",
"key",
"default",
")",
";",
"if",
"(",
"http",
"time",
"out",
"=",
"=",
"0",
")",
"{",
"/",
"/",
"if",
"timeout",
"value",
"is",
"set",
"to",
"zero",
",",
"the",
"feature",
"is",
"turned",
"off",
"return",
";",
"}",
"try",
"{",
"string",
"stacks",
"url",
"=",
"d",
"f",
"s",
"util",
"get",
"info",
"server",
"(",
"local",
"n",
"n",
"target",
"get",
"address",
"(",
")",
",",
"conf",
",",
"d",
"f",
"s",
"util",
"get",
"http",
"client",
"scheme",
"(",
"conf",
")",
")",
"+",
"\"",
"/",
"stacks",
"\"",
";",
"url",
"url",
"=",
"new",
"url",
"(",
"stacks",
"url",
")",
";",
"http",
"u",
"r",
"l",
"connection",
"conn",
"=",
"(",
"http",
"u",
"r",
"l",
"connection",
")",
"url",
"open",
"connection",
"(",
")",
";",
"conn",
"set",
"read",
"timeout",
"(",
"http",
"time",
"out",
")",
";",
"conn",
"set",
"connect",
"timeout",
"(",
"http",
"time",
"out",
")",
";",
"conn",
"connect",
"(",
")",
";",
"byte",
"array",
"output",
"stream",
"out",
"=",
"new",
"byte",
"array",
"output",
"stream",
"(",
")",
";",
"i",
"o",
"utils",
"copy",
"bytes",
"(",
"conn",
"get",
"input",
"stream",
"(",
")",
",",
"out",
",",
"4096",
",",
"true",
")",
";",
"string",
"builder",
"local",
"n",
"n",
"thread",
"dump",
"content",
"=",
"new",
"string",
"builder",
"(",
"\"",
"-",
"-",
"local",
"nn",
"thread",
"dump",
"-",
"-",
"\\",
"n",
"\"",
")",
";",
"local",
"n",
"n",
"thread",
"dump",
"content",
"append",
"(",
"out",
")",
"append",
"(",
"\"",
"\\",
"n",
"-",
"-",
"local",
"nn",
"thread",
"dump",
"-",
"-",
"\"",
")",
";",
"log",
"info",
"(",
"\"",
"{",
"}",
"\"",
",",
"local",
"n",
"n",
"thread",
"dump",
"content",
"to",
"string",
"(",
")",
")",
";",
"is",
"thread",
"dump",
"captured",
"=",
"true",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"log",
"warn",
"(",
"\"",
"can",
"'",
"t",
"get",
"local",
"nn",
"thread",
"dump",
"due",
"to",
"\"",
"+",
"e",
"get",
"message",
"(",
")",
")",
";",
"}",
"}"
] |
[
"creates",
"a",
"mutable",
",",
"empty",
"{",
"@",
"code",
"tree",
"set",
"}",
"instance",
"sorted",
"by",
"the",
"natural",
"sort",
"ordering",
"of",
"its",
"elements",
"<",
"b",
">",
"note",
":",
"<",
"b",
">",
"if",
"mutability",
"is",
"not",
"required",
",",
"use",
"{",
"@",
"link",
"immutable",
"sorted",
"set",
"#",
"of",
"(",
")",
"}",
"instead",
"<",
"b",
">",
"note",
"for",
"java",
"7",
"and",
"later",
":",
"<",
"b",
">",
"this",
"method",
"is",
"now",
"unnecessary",
"and",
"should",
"be",
"treated",
"as",
"deprecated",
"instead",
",",
"use",
"the",
"{",
"@",
"code",
"tree",
"set",
"}",
"constructor",
"directly",
",",
"taking",
"advantage",
"of",
"the",
"new",
"<",
"a",
"href",
"=",
"\"",
"http",
":",
"goo",
"gliz",
"2",
"wi",
"\"",
">",
"\"",
"diamond",
"\"",
"syntax"
] | [
"public",
"static",
"<",
"e",
"extends",
"comparable",
">",
"tree",
"set",
"<",
"e",
">",
"new",
"tree",
"set",
"(",
")",
"{",
"return",
"new",
"tree",
"set",
"<",
"e",
">",
"(",
")",
";",
"}"
] |
[
"add",
"meta",
"data"
] | [
"public",
"void",
"add",
"metadata",
"(",
"final",
"string",
"key",
",",
"final",
"string",
"value",
")",
"{",
"if",
"(",
"metadata",
"=",
"=",
"null",
")",
"{",
"metadata",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
"4",
")",
";",
"}",
"metadata",
"put",
"(",
"key",
",",
"value",
")",
";",
"}"
] |
[
"gets",
"the",
"value",
"as",
"{",
"@",
"code",
"int",
"}",
"bits",
"if",
"this",
"instance",
"contains",
"more",
"bits",
"than",
"fit",
"in",
"an",
"{",
"@",
"code",
"int",
"}",
",",
"then",
"this",
"returns",
"only",
"the",
"low",
"-",
"order",
"bits"
] | [
"public",
"abstract",
"int",
"get",
"int",
"bits",
"(",
")",
";"
] |
[
"set",
"the",
"database",
"product",
"name",
"for",
"this",
"translator",
"setting",
"this",
"property",
"will",
"avoid",
"obtaining",
"a",
"connection",
"from",
"the",
"data",
"source",
"to",
"get",
"the",
"meta",
"-",
"data"
] | [
"public",
"void",
"set",
"database",
"product",
"name",
"(",
"string",
"db",
"name",
")",
"{",
"this",
"sql",
"error",
"codes",
"=",
"singleton",
"supplier",
"of",
"(",
"s",
"q",
"l",
"error",
"codes",
"factory",
"get",
"instance",
"(",
")",
"get",
"error",
"codes",
"(",
"db",
"name",
")",
")",
";",
"}"
] |
[
"split",
"one",
"header",
"value",
"in",
"multipart"
] | [
"private",
"static",
"string",
"[",
"]",
"split",
"multipart",
"header",
"values",
"(",
"string",
"svalue",
")",
"{",
"list",
"<",
"string",
">",
"values",
"=",
"internal",
"thread",
"local",
"map",
"get",
"(",
")",
"array",
"list",
"(",
"1",
")",
";",
"boolean",
"in",
"quote",
"=",
"false",
";",
"boolean",
"escape",
"next",
"=",
"false",
";",
"int",
"start",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"svalue",
"length",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"char",
"c",
"=",
"svalue",
"char",
"at",
"(",
"i",
")",
";",
"if",
"(",
"in",
"quote",
")",
"{",
"if",
"(",
"escape",
"next",
")",
"{",
"escape",
"next",
"=",
"false",
";",
"}",
"else",
"{",
"if",
"(",
"c",
"=",
"=",
"'",
"\\",
"\\",
"'",
")",
"{",
"escape",
"next",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"c",
"=",
"=",
"'",
"\"",
"'",
")",
"{",
"in",
"quote",
"=",
"false",
";",
"}",
"}",
"}",
"else",
"{",
"if",
"(",
"c",
"=",
"=",
"'",
"\"",
"'",
")",
"{",
"in",
"quote",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"c",
"=",
"=",
"'",
";",
"'",
")",
"{",
"values",
"add",
"(",
"svalue",
"substring",
"(",
"start",
",",
"i",
")",
")",
";",
"start",
"=",
"i",
"+",
"1",
";",
"}",
"}",
"}",
"values",
"add",
"(",
"svalue",
"substring",
"(",
"start",
")",
")",
";",
"return",
"values",
"to",
"array",
"(",
"new",
"string",
"[",
"0",
"]",
")",
";",
"}"
] |
[
"creates",
"and",
"populates",
"{",
"@",
"link",
"instruction",
"table",
"data",
"object",
"}",
"instances",
",",
"one",
"for",
"every",
"mnemonicoperand",
"in",
"the",
"instruction",
"set",
"these",
"will",
"define",
"the",
"contents",
"of",
"the",
"table"
] | [
"protected",
"instruction",
"table",
"data",
"object",
"[",
"]",
"[",
"]",
"create",
"data",
"objects",
"(",
")",
"{",
"if",
"(",
"dialog",
"get",
"search",
"data",
"(",
")",
"get",
"instructions",
"(",
")",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"instruction",
"table",
"data",
"object",
"[",
"]",
"[",
"]",
"data",
"objects",
"=",
"new",
"instruction",
"table",
"data",
"object",
"[",
"dialog",
"get",
"search",
"data",
"(",
")",
"get",
"instructions",
"(",
")",
"size",
"(",
")",
"]",
"[",
"num",
"columns",
"]",
";",
"/",
"/",
"loop",
"over",
"all",
"instructions",
",",
"adding",
"pertinent",
"info",
"to",
"each",
"data",
"object",
"this",
"could",
"be",
"a",
"long",
"-",
"running",
"/",
"/",
"operation",
"so",
"put",
"in",
"a",
"task",
"that",
"can",
"be",
"cancelled",
"task",
"b",
"task",
"=",
"new",
"task",
"(",
"\"",
"creating",
"table",
"data",
"\"",
",",
"true",
",",
"true",
",",
"true",
")",
"{",
"@",
"override",
"public",
"void",
"run",
"(",
"task",
"monitor",
"monitor",
")",
"{",
"int",
"num",
"instructions",
"=",
"dialog",
"get",
"search",
"data",
"(",
")",
"get",
"instructions",
"(",
")",
"size",
"(",
")",
";",
"monitor",
"set",
"maximum",
"(",
"num",
"instructions",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"num",
"instructions",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"monitor",
"is",
"cancelled",
"(",
")",
")",
"{",
"return",
";",
"}",
"monitor",
"increment",
"progress",
"(",
"1",
")",
";",
"process",
"instruction",
"(",
"data",
"objects",
",",
"i",
")",
";",
"}",
"}",
"}",
";",
"new",
"task",
"launcher",
"(",
"b",
"task",
",",
"this",
")",
";",
"return",
"data",
"objects",
";",
"}"
] |
[
"obtains",
"the",
"access",
"time",
"for",
"a",
"resource",
"it",
"represents",
"the",
"view",
"of",
"the",
"resource",
"at",
"the",
"time",
"of",
"the",
"query",
"the",
"value",
"may",
"have",
"been",
"updated",
"at",
"a",
"later",
"point"
] | [
"long",
"get",
"access",
"time",
"(",
"string",
"key",
")",
"{",
"string",
"interned",
"=",
"intern",
"(",
"key",
")",
";",
"synchronized",
"(",
"interned",
")",
"{",
"shared",
"cache",
"resource",
"resource",
"=",
"cached",
"resources",
"get",
"(",
"interned",
")",
";",
"return",
"resource",
"=",
"=",
"null",
"?",
"-",
"1",
":",
"resource",
"get",
"access",
"time",
"(",
")",
";",
"}",
"}"
] |
[
"we",
"have",
"three",
"completed",
"checkpoints",
"(",
"1",
",",
"2",
",",
"3",
")",
"in",
"the",
"state",
"handle",
"store",
"we",
"expect",
"that",
"{",
"@",
"link",
"default",
"completed",
"checkpoint",
"store",
"#",
"recover",
"(",
")",
"}",
"should",
"recover",
"the",
"sorted",
"checkpoints",
"by",
"name"
] | [
"public",
"void",
"test",
"recover",
"sorted",
"checkpoints",
"(",
")",
"throws",
"exception",
"{",
"final",
"testing",
"state",
"handle",
"store",
"<",
"completed",
"checkpoint",
">",
"state",
"handle",
"store",
"=",
"builder",
"set",
"get",
"all",
"supplier",
"(",
"(",
")",
"-",
">",
"create",
"state",
"handles",
"(",
"3",
")",
")",
"build",
"(",
")",
";",
"final",
"completed",
"checkpoint",
"store",
"completed",
"checkpoint",
"store",
"=",
"create",
"completed",
"checkpoint",
"store",
"(",
"state",
"handle",
"store",
")",
";",
"completed",
"checkpoint",
"store",
"recover",
"(",
")",
";",
"final",
"list",
"<",
"completed",
"checkpoint",
">",
"recovered",
"completed",
"checkpoint",
"=",
"completed",
"checkpoint",
"store",
"get",
"all",
"checkpoints",
"(",
")",
";",
"assert",
"that",
"(",
"recovered",
"completed",
"checkpoint",
"size",
"(",
")",
",",
"is",
"(",
"3",
")",
")",
";",
"final",
"list",
"<",
"long",
">",
"checkpoint",
"ids",
"=",
"recovered",
"completed",
"checkpoint",
"stream",
"(",
")",
"map",
"(",
"completed",
"checkpoint",
":",
":",
"get",
"checkpoint",
"i",
"d",
")",
"collect",
"(",
"collectors",
"to",
"list",
"(",
")",
")",
";",
"assert",
"that",
"(",
"checkpoint",
"ids",
",",
"contains",
"(",
"1l",
",",
"2l",
",",
"3l",
")",
")",
";",
"}"
] |
[
"set",
"the",
"version",
"of",
"this",
"schema",
"schema",
"versions",
"are",
"integers",
"which",
",",
"if",
"provided",
",",
"must",
"indicate",
"which",
"schema",
"is",
"newer",
"and",
"which",
"is",
"older",
"by",
"their",
"ordering"
] | [
"public",
"schema",
"builder",
"version",
"(",
"integer",
"version",
")",
"{",
"check",
"can",
"set",
"(",
"version",
"field",
",",
"this",
"version",
",",
"version",
")",
";",
"this",
"version",
"=",
"version",
";",
"return",
"this",
";",
"}"
] |
[
"returns",
"the",
"global",
"aggregate",
"manager",
"for",
"the",
"current",
"job"
] | [
"public",
"global",
"aggregate",
"manager",
"get",
"global",
"aggregate",
"manager",
"(",
")",
"{",
"return",
"task",
"environment",
"get",
"global",
"aggregate",
"manager",
"(",
")",
";",
"}"
] |
[
"gets",
"an",
"exception",
"handling",
"state",
"data",
"type"
] | [
"public",
"static",
"data",
"type",
"get",
"e",
"h",
"state",
"data",
"type",
"(",
"program",
"program",
")",
"{",
"data",
"type",
"manager",
"dtm",
"=",
"program",
"get",
"data",
"type",
"manager",
"(",
")",
";",
"data",
"type",
"dt",
"=",
"new",
"typedef",
"data",
"type",
"(",
"new",
"category",
"path",
"(",
"\"",
"/",
"\"",
")",
",",
"\"",
"ehstate",
"t",
"\"",
",",
"new",
"integer",
"data",
"type",
"(",
"dtm",
")",
",",
"dtm",
")",
";",
"return",
"m",
"s",
"data",
"type",
"utils",
"get",
"matching",
"data",
"type",
"(",
"program",
",",
"dt",
")",
";",
"}"
] |
[
"delete",
"user",
"this",
"can",
"only",
"be",
"done",
"by",
"the",
"logged",
"in",
"user"
] | [
"public",
"void",
"delete",
"user",
"(",
"string",
"username",
")",
"throws",
"api",
"exception",
"{",
"delete",
"user",
"with",
"http",
"info",
"(",
"username",
")",
";",
"}"
] |
[
"get",
"userlogin",
":",
"logs",
"user",
"into",
"the",
"system"
] | [
"default",
"response",
"entity",
"<",
"string",
">",
"login",
"user",
"(",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"the",
"user",
"name",
"for",
"login",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"username",
"\"",
",",
"required",
"=",
"true",
")",
"string",
"username",
",",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"the",
"password",
"for",
"login",
"in",
"clear",
"text",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"password",
"\"",
",",
"required",
"=",
"true",
")",
"string",
"password",
")",
"{",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"http",
"status",
"not",
"implemented",
")",
";",
"}"
] |
[
"get",
"prefix",
"ns",
"wrapped",
"array"
] | [
"public",
"list",
"<",
"integer",
">",
"get",
"prefix",
"ns",
"wrapped",
"array",
"(",
")",
"{",
"return",
"prefix",
"ns",
"wrapped",
"array",
";",
"}"
] |
[
"{",
"@",
"inherit",
"doc",
"}"
] | [
"public",
"void",
"write",
"to",
"(",
"annotated",
"output",
"out",
",",
"dalv",
"insn",
"insn",
")",
"{",
"register",
"spec",
"list",
"regs",
"=",
"insn",
"get",
"registers",
"(",
")",
";",
"int",
"offset",
"=",
"(",
"(",
"target",
"insn",
")",
"insn",
")",
"get",
"target",
"offset",
"(",
")",
";",
"write",
"(",
"out",
",",
"opcode",
"unit",
"(",
"insn",
",",
"regs",
"get",
"(",
"0",
")",
"get",
"reg",
"(",
")",
")",
",",
"offset",
")",
";",
"}"
] |
[
"called",
"before",
"any",
"match",
"rules",
"are",
"applied"
] | [
"public",
"void",
"pre",
"match",
"apply",
"(",
"match",
"action",
"[",
"]",
"matchactions",
",",
"address",
"addr",
")",
"{",
"/",
"/",
"override",
"if",
"any",
"initialization",
"needs",
"to",
"be",
"done",
"before",
"rule",
"application",
"}"
] |
[
"caches",
"the",
"given",
"key",
"-",
"value",
"pair",
"important",
":",
"the",
"client",
"should",
"use",
"the",
"returned",
"reference",
"instead",
"of",
"the",
"original",
"one",
"it",
"is",
"the",
"caller",
"'",
"s",
"responsibility",
"to",
"close",
"the",
"returned",
"reference",
"once",
"not",
"needed",
"anymore"
] | [
"public",
"@",
"nullable",
"closeable",
"reference",
"<",
"v",
">",
"cache",
"(",
"final",
"k",
"key",
",",
"final",
"closeable",
"reference",
"<",
"v",
">",
"value",
"ref",
")",
"{",
"return",
"cache",
"(",
"key",
",",
"value",
"ref",
",",
"m",
"entry",
"state",
"observer",
")",
";",
"}"
] |
[
"utility",
"method",
"that",
"will",
"count",
"the",
"number",
"of",
"{",
"@",
"link",
"#",
"add",
"entry",
"to",
"restore",
"log",
"(",
"object",
",",
"object",
")",
"restore",
"entries",
"}",
"missing",
"from",
"the",
"supplied",
"store"
] | [
"public",
"int",
"check",
"for",
"restored",
"entries",
"(",
"final",
"key",
"value",
"store",
"<",
"k",
",",
"v",
">",
"store",
")",
"{",
"int",
"missing",
"=",
"0",
";",
"for",
"(",
"final",
"key",
"value",
"<",
"byte",
"[",
"]",
",",
"byte",
"[",
"]",
">",
"kv",
":",
"restorable",
"entries",
")",
"{",
"if",
"(",
"kv",
"!",
"=",
"null",
")",
"{",
"final",
"v",
"value",
"=",
"store",
"get",
"(",
"state",
"serdes",
"key",
"from",
"(",
"kv",
"key",
")",
")",
";",
"if",
"(",
"!",
"objects",
"equals",
"(",
"value",
",",
"state",
"serdes",
"value",
"from",
"(",
"kv",
"value",
")",
")",
")",
"{",
"+",
"+",
"missing",
";",
"}",
"}",
"}",
"return",
"missing",
";",
"}"
] |
[
"test",
"case",
"for",
"https",
":",
"issues",
"apache",
"orgjirabrowse",
"z",
"o",
"o",
"k",
"e",
"e",
"p",
"e",
"r",
"-",
"2264"
] | [
"public",
"void",
"test",
"error",
"message",
"whenclient",
"port",
"not",
"set",
"butclient",
"port",
"address",
"set",
"(",
")",
"throws",
"i",
"o",
"exception",
",",
"config",
"exception",
"{",
"quorum",
"peer",
"config",
"quorum",
"peer",
"config",
"=",
"new",
"quorum",
"peer",
"config",
"(",
")",
";",
"try",
"{",
"properties",
"zk",
"prop",
"=",
"get",
"default",
"z",
"k",
"properties",
"(",
")",
";",
"zk",
"prop",
"set",
"property",
"(",
"\"",
"client",
"port",
"address",
"\"",
",",
"\"",
"localhost",
"\"",
")",
";",
"quorum",
"peer",
"config",
"parse",
"properties",
"(",
"zk",
"prop",
")",
";",
"fail",
"(",
"\"",
"illegal",
"argument",
"exception",
"is",
"expected",
"\"",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"string",
"expected",
"message",
"=",
"\"",
"client",
"port",
"address",
"is",
"set",
"but",
"client",
"port",
"is",
"not",
"set",
"\"",
";",
"assert",
"equals",
"(",
"expected",
"message",
",",
"e",
"get",
"message",
"(",
")",
")",
";",
"}",
"}"
] |
[
"get",
"a",
"protocol",
"proxy",
"that",
"contains",
"a",
"proxy",
"connection",
"to",
"a",
"remote",
"server",
"and",
"a",
"set",
"of",
"methods",
"that",
"are",
"supported",
"by",
"the",
"server"
] | [
"public",
"static",
"<",
"t",
">",
"protocol",
"proxy",
"<",
"t",
">",
"wait",
"for",
"protocol",
"proxy",
"(",
"class",
"<",
"t",
">",
"protocol",
",",
"long",
"client",
"version",
",",
"inet",
"socket",
"address",
"addr",
",",
"configuration",
"conf",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"wait",
"for",
"protocol",
"proxy",
"(",
"protocol",
",",
"client",
"version",
",",
"addr",
",",
"conf",
",",
"long",
"max",
"value",
")",
";",
"}"
] |
[
"get",
"the",
"num",
"open",
"connections",
"user"
] | [
"public",
"string",
"get",
"num",
"open",
"connections",
"per",
"user",
"(",
")",
"{",
"object",
"mapper",
"mapper",
"=",
"new",
"object",
"mapper",
"(",
")",
";",
"try",
"{",
"return",
"mapper",
"write",
"value",
"as",
"string",
"(",
"connection",
"manager",
"get",
"user",
"to",
"connections",
"map",
"(",
")",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ignored",
")",
"{",
"}",
"return",
"null",
";",
"}"
] |
[
"get",
"the",
"value",
"of",
"the",
"'",
"{",
"@",
"code",
"value",
"}",
"'",
"attribute"
] | [
"public",
"string",
"get",
"value",
"(",
")",
"{",
"return",
"this",
"value",
";",
"}"
] |
[
"create",
"a",
"proxy",
"for",
"an",
"interface",
"of",
"implementations",
"of",
"that",
"interface",
"using",
"the",
"given",
"{",
"@",
"link",
"failover",
"proxy",
"provider",
"}",
"and",
"the",
"same",
"retry",
"policy",
"for",
"each",
"method",
"in",
"the",
"interface"
] | [
"public",
"static",
"<",
"t",
">",
"object",
"create",
"(",
"class",
"<",
"t",
">",
"iface",
",",
"failover",
"proxy",
"provider",
"<",
"t",
">",
"proxy",
"provider",
",",
"retry",
"policy",
"retry",
"policy",
")",
"{",
"return",
"proxy",
"new",
"proxy",
"instance",
"(",
"proxy",
"provider",
"get",
"interface",
"(",
")",
"get",
"class",
"loader",
"(",
")",
",",
"new",
"class",
"<",
"?",
">",
"[",
"]",
"{",
"iface",
"}",
",",
"new",
"retry",
"invocation",
"handler",
"<",
"t",
">",
"(",
"proxy",
"provider",
",",
"retry",
"policy",
")",
")",
";",
"}"
] |
[
"causes",
"the",
"tree",
"to",
"refilter",
"immediately",
"(",
"before",
"this",
"method",
"returns",
")"
] | [
"public",
"void",
"refilter",
"now",
"(",
")",
"{",
"if",
"(",
"is",
"filtering",
"enabled",
"&",
"&",
"filter",
"!",
"=",
"null",
")",
"{",
"filter",
"update",
"manager",
"update",
"now",
"(",
")",
";",
"}",
"}"
] |
[
"called",
"when",
"the",
"{",
"@",
"link",
"application",
"}",
"is",
"destroyed",
"preceded",
"by",
"a",
"call",
"to",
"{",
"@",
"link",
"#",
"pause",
"(",
")",
"}"
] | [
"public",
"void",
"dispose",
"(",
")",
";"
] |
[
"returns",
"a",
"funnel",
"that",
"encodes",
"the",
"characters",
"of",
"a",
"{",
"@",
"code",
"char",
"sequence",
"}",
"with",
"the",
"specified",
"{",
"@",
"code",
"charset",
"}"
] | [
"public",
"static",
"funnel",
"<",
"char",
"sequence",
">",
"string",
"funnel",
"(",
"charset",
"charset",
")",
"{",
"return",
"new",
"string",
"charset",
"funnel",
"(",
"charset",
")",
";",
"}"
] |
[
"checks",
"that",
"thread",
"does",
"not",
"terminate",
"within",
"the",
"given",
"millisecond",
"delay"
] | [
"void",
"assert",
"thread",
"stays",
"alive",
"(",
"thread",
"thread",
",",
"long",
"millis",
")",
"{",
"try",
"{",
"/",
"/",
"no",
"need",
"to",
"optimize",
"the",
"failing",
"case",
"via",
"thread",
"join",
"delay",
"(",
"millis",
")",
";",
"assert",
"true",
"(",
"thread",
"is",
"alive",
"(",
")",
")",
";",
"}",
"catch",
"(",
"interrupted",
"exception",
"ie",
")",
"{",
"fail",
"(",
"\"",
"unexpected",
"interrupted",
"exception",
"\"",
")",
";",
"}",
"}"
] |
[
"initiates",
"a",
"project",
"cross",
"transformation",
"and",
"projects",
"the",
"first",
"cross",
"input",
"if",
"the",
"first",
"cross",
"input",
"is",
"a",
"{",
"@",
"link",
"tuple",
"}",
"{",
"@",
"link",
"data",
"set",
"}",
",",
"fields",
"can",
"be",
"selected",
"by",
"their",
"index",
"if",
"the",
"first",
"cross",
"input",
"is",
"not",
"a",
"tuple",
"data",
"set",
",",
"no",
"parameters",
"should",
"be",
"passed",
"fields",
"of",
"the",
"first",
"and",
"second",
"input",
"can",
"be",
"added",
"by",
"chaining",
"the",
"method",
"calls",
"of",
"{",
"@",
"link",
"org",
"apache",
"flink",
"api",
"java",
"operators",
"cross",
"operator",
"project",
"cross",
"#",
"project",
"first",
"(",
"int",
")",
"}",
"and",
"{",
"@",
"link",
"org",
"apache",
"flink",
"api",
"java",
"operators",
"cross",
"operator",
"project",
"cross",
"#",
"project",
"second",
"(",
"int",
")",
"}",
"<",
"b",
">",
"note",
":",
"with",
"the",
"current",
"implementation",
",",
"the",
"project",
"transformation",
"looses",
"type",
"information",
"<",
"b",
">"
] | [
"public",
"<",
"out",
"extends",
"tuple",
">",
"project",
"cross",
"<",
"i1",
",",
"i2",
",",
"out",
">",
"project",
"first",
"(",
"int",
"first",
"field",
"indexes",
")",
"{",
"return",
"new",
"cross",
"projection",
"<",
"i1",
",",
"i2",
">",
"(",
"get",
"input",
"1",
"(",
")",
",",
"get",
"input",
"2",
"(",
")",
",",
"first",
"field",
"indexes",
",",
"null",
",",
"get",
"cross",
"hint",
"(",
")",
")",
"project",
"tuple",
"x",
"(",
")",
";",
"}"
] |
[
"if",
"{",
"@",
"code",
"true",
"}",
",",
"indicates",
"that",
"the",
"call",
"is",
"capable",
"of",
"sending",
"additional",
"messages",
"without",
"requiring",
"excessive",
"buffering",
"internally",
"this",
"event",
"is",
"just",
"a",
"suggestion",
"and",
"the",
"application",
"is",
"free",
"to",
"ignore",
"it",
",",
"however",
"doing",
"so",
"may",
"result",
"in",
"excessive",
"buffering",
"within",
"the",
"call",
"if",
"{",
"@",
"code",
"false",
"}",
",",
"{",
"@",
"link",
"listener",
"#",
"on",
"ready",
"(",
")",
"}",
"will",
"be",
"called",
"after",
"{",
"@",
"code",
"is",
"ready",
"(",
")",
"}",
"transitions",
"to",
"{",
"@",
"code",
"true",
"}",
"if",
"the",
"type",
"of",
"the",
"call",
"is",
"either",
"{",
"@",
"link",
"method",
"descriptor",
"method",
"type",
"#",
"unary",
"}",
"or",
"{",
"@",
"link",
"method",
"descriptor",
"method",
"type",
"#",
"server",
"streaming",
"}",
",",
"this",
"method",
"may",
"persistently",
"return",
"false",
"calls",
"that",
"send",
"exactly",
"one",
"message",
"should",
"not",
"check",
"this",
"method",
"this",
"abstract",
"class",
"'",
"s",
"implementation",
"always",
"returns",
"{",
"@",
"code",
"true",
"}",
"implementations",
"generally",
"override",
"the",
"method"
] | [
"public",
"boolean",
"is",
"ready",
"(",
")",
"{",
"return",
"true",
";",
"}"
] |
[
"an",
"implementation",
"for",
"{",
"@",
"link",
"set",
"#",
"hash",
"code",
"(",
")",
"}"
] | [
"static",
"int",
"hash",
"code",
"impl",
"(",
"set",
"<",
"?",
">",
"s",
")",
"{",
"int",
"hash",
"code",
"=",
"0",
";",
"for",
"(",
"object",
"o",
":",
"s",
")",
"{",
"hash",
"code",
"+",
"=",
"o",
"!",
"=",
"null",
"?",
"o",
"hash",
"code",
"(",
")",
":",
"0",
";",
"hash",
"code",
"=",
"~",
"~",
"hash",
"code",
";",
"/",
"/",
"needed",
"to",
"deal",
"with",
"unusual",
"integer",
"overflow",
"in",
"gwt",
"}",
"return",
"hash",
"code",
";",
"}"
] |
[
"wrapper",
"around",
"create",
"file",
"(",
")",
"on",
"windows"
] | [
"public",
"static",
"native",
"file",
"descriptor",
"create",
"file",
"(",
"string",
"path",
",",
"long",
"desired",
"access",
",",
"long",
"share",
"mode",
",",
"long",
"creation",
"disposition",
")",
"throws",
"i",
"o",
"exception",
";"
] |
[
"tests",
"reducer",
"throwing",
"exception"
] | [
"public",
"void",
"test",
"reducer",
"fail",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"conf",
"=",
"create",
"job",
"conf",
"(",
")",
";",
"job",
"job",
"=",
"map",
"reduce",
"test",
"util",
"create",
"job",
"(",
"conf",
",",
"in",
"dir",
",",
"out",
"dir",
",",
"1",
",",
"1",
",",
"input",
")",
";",
"job",
"set",
"job",
"name",
"(",
"\"",
"chain",
"\"",
")",
";",
"chain",
"mapper",
"add",
"mapper",
"(",
"job",
",",
"mapper",
"class",
",",
"long",
"writable",
"class",
",",
"text",
"class",
",",
"long",
"writable",
"class",
",",
"text",
"class",
",",
"null",
")",
";",
"chain",
"reducer",
"set",
"reducer",
"(",
"job",
",",
"fail",
"reduce",
"class",
",",
"long",
"writable",
"class",
",",
"text",
"class",
",",
"long",
"writable",
"class",
",",
"text",
"class",
",",
"null",
")",
";",
"chain",
"reducer",
"add",
"mapper",
"(",
"job",
",",
"mapper",
"class",
",",
"long",
"writable",
"class",
",",
"text",
"class",
",",
"long",
"writable",
"class",
",",
"text",
"class",
",",
"null",
")",
";",
"job",
"wait",
"for",
"completion",
"(",
"true",
")",
";",
"assert",
"true",
"(",
"\"",
"job",
"not",
"failed",
"\"",
",",
"!",
"job",
"is",
"successful",
"(",
")",
")",
";",
"}"
] |
[
"create",
"a",
"{",
"@",
"link",
"record",
"writer",
"}",
"from",
"path"
] | [
"public",
"record",
"writer",
"create",
"record",
"writer",
"(",
"path",
"path",
")",
"{",
"try",
"{",
"check",
"initialize",
"(",
")",
";",
"job",
"conf",
"conf",
"=",
"new",
"job",
"conf",
"(",
"conf",
"wrapper",
"conf",
"(",
")",
")",
";",
"if",
"(",
"is",
"compressed",
")",
"{",
"string",
"codec",
"str",
"=",
"conf",
"get",
"(",
"hive",
"conf",
"conf",
"vars",
"compressintermediatecodec",
"varname",
")",
";",
"if",
"(",
"!",
"string",
"utils",
"is",
"null",
"or",
"whitespace",
"only",
"(",
"codec",
"str",
")",
")",
"{",
"/",
"/",
"noinspection",
"unchecked",
"class",
"<",
"?",
"extends",
"compression",
"codec",
">",
"codec",
"=",
"(",
"class",
"<",
"?",
"extends",
"compression",
"codec",
">",
")",
"class",
"for",
"name",
"(",
"codec",
"str",
",",
"true",
",",
"thread",
"current",
"thread",
"(",
")",
"get",
"context",
"class",
"loader",
"(",
")",
")",
";",
"file",
"output",
"format",
"set",
"output",
"compressor",
"class",
"(",
"conf",
",",
"codec",
")",
";",
"}",
"string",
"type",
"str",
"=",
"conf",
"get",
"(",
"hive",
"conf",
"conf",
"vars",
"compressintermediatetype",
"varname",
")",
";",
"if",
"(",
"!",
"string",
"utils",
"is",
"null",
"or",
"whitespace",
"only",
"(",
"type",
"str",
")",
")",
"{",
"sequence",
"file",
"compression",
"type",
"style",
"=",
"sequence",
"file",
"compression",
"type",
"value",
"of",
"(",
"type",
"str",
")",
";",
"sequence",
"file",
"output",
"format",
"set",
"output",
"compression",
"type",
"(",
"conf",
",",
"style",
")",
";",
"}",
"}",
"return",
"hive",
"shim",
"get",
"hive",
"record",
"writer",
"(",
"conf",
",",
"hive",
"output",
"format",
"clz",
",",
"record",
"ser",
"de",
"get",
"serialized",
"class",
"(",
")",
",",
"is",
"compressed",
",",
"table",
"properties",
",",
"path",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"new",
"flink",
"hive",
"exception",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"put",
"fakebody",
"-",
"with",
"-",
"query",
"-",
"params"
] | [
"default",
"completable",
"future",
"<",
"response",
"entity",
"<",
"void",
">",
">",
"test",
"body",
"with",
"query",
"params",
"(",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"query",
"\"",
",",
"required",
"=",
"true",
")",
"string",
"query",
",",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"body",
"user",
"body",
")",
"{",
"return",
"completable",
"future",
"completed",
"future",
"(",
"new",
"response",
"entity",
"<",
">",
"(",
"http",
"status",
"not",
"implemented",
")",
")",
";",
"}"
] |
[
"refresh",
"the",
"rmi",
"stub",
"and",
"retry",
"the",
"given",
"invocation",
"called",
"by",
"invoke",
"on",
"connect",
"failure"
] | [
"protected",
"object",
"refresh",
"and",
"retry",
"(",
"method",
"invocation",
"invocation",
")",
"throws",
"throwable",
"{",
"object",
"fresh",
"stub",
";",
"synchronized",
"(",
"this",
"stub",
"monitor",
")",
"{",
"this",
"cached",
"stub",
"=",
"null",
";",
"fresh",
"stub",
"=",
"lookup",
"stub",
"(",
")",
";",
"if",
"(",
"this",
"cache",
"stub",
")",
"{",
"this",
"cached",
"stub",
"=",
"fresh",
"stub",
";",
"}",
"}",
"return",
"do",
"invoke",
"(",
"invocation",
",",
"fresh",
"stub",
")",
";",
"}"
] |
[
"signals",
"that",
"this",
"target",
"'",
"s",
"module",
"map",
"should",
"not",
"be",
"an",
"input",
"to",
"c",
"+",
"+",
"compile",
"actions"
] | [
"public",
"cc",
"compilation",
"helper",
"set",
"propagate",
"module",
"map",
"to",
"compile",
"action",
"(",
"boolean",
"propagates",
"module",
"map",
")",
"{",
"this",
"propagate",
"module",
"map",
"to",
"compile",
"action",
"=",
"propagates",
"module",
"map",
";",
"return",
"this",
";",
"}"
] |
[
"merges",
"the",
"given",
"sorted",
"runs",
"to",
"a",
"smaller",
"number",
"of",
"sorted",
"runs"
] | [
"public",
"list",
"<",
"channel",
"with",
"meta",
">",
"merge",
"channel",
"list",
"(",
"list",
"<",
"channel",
"with",
"meta",
">",
"channel",
"i",
"ds",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"a",
"channel",
"list",
"with",
"length",
"max",
"fan",
"in",
"<",
"sup",
">",
"i",
"<",
"/",
"sup",
">",
"can",
"be",
"merged",
"to",
"max",
"fan",
"in",
"files",
"in",
"i",
"-",
"1",
"/",
"/",
"rounds",
"where",
"every",
"merge",
"/",
"/",
"is",
"a",
"full",
"merge",
"with",
"max",
"fan",
"in",
"input",
"channels",
"a",
"partial",
"round",
"includes",
"merges",
"with",
"fewer",
"/",
"/",
"than",
"max",
"fan",
"in",
"/",
"/",
"inputs",
"it",
"is",
"most",
"efficient",
"to",
"perform",
"the",
"partial",
"round",
"first",
"final",
"double",
"scale",
"=",
"math",
"ceil",
"(",
"math",
"log",
"(",
"channel",
"i",
"ds",
"size",
"(",
")",
")",
"/",
"math",
"log",
"(",
"max",
"fan",
"in",
")",
")",
"-",
"1",
";",
"final",
"int",
"num",
"start",
"=",
"channel",
"i",
"ds",
"size",
"(",
")",
";",
"final",
"int",
"num",
"end",
"=",
"(",
"int",
")",
"math",
"pow",
"(",
"max",
"fan",
"in",
",",
"scale",
")",
";",
"final",
"int",
"num",
"merges",
"=",
"(",
"int",
")",
"math",
"ceil",
"(",
"(",
"num",
"start",
"-",
"num",
"end",
")",
"/",
"(",
"double",
")",
"(",
"max",
"fan",
"in",
"-",
"1",
")",
")",
";",
"final",
"int",
"num",
"not",
"merged",
"=",
"num",
"end",
"-",
"num",
"merges",
";",
"final",
"int",
"num",
"to",
"merge",
"=",
"num",
"start",
"-",
"num",
"not",
"merged",
";",
"/",
"/",
"unmerged",
"channel",
"i",
"ds",
"are",
"copied",
"directly",
"to",
"the",
"result",
"list",
"final",
"list",
"<",
"channel",
"with",
"meta",
">",
"merged",
"channel",
"i",
"ds",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"num",
"end",
")",
";",
"merged",
"channel",
"i",
"ds",
"add",
"all",
"(",
"channel",
"i",
"ds",
"sub",
"list",
"(",
"0",
",",
"num",
"not",
"merged",
")",
")",
";",
"final",
"int",
"channels",
"to",
"merge",
"per",
"step",
"=",
"(",
"int",
")",
"math",
"ceil",
"(",
"num",
"to",
"merge",
"/",
"(",
"double",
")",
"num",
"merges",
")",
";",
"final",
"list",
"<",
"channel",
"with",
"meta",
">",
"channels",
"to",
"merge",
"this",
"step",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"channels",
"to",
"merge",
"per",
"step",
")",
";",
"int",
"channel",
"num",
"=",
"num",
"not",
"merged",
";",
"while",
"(",
"!",
"closed",
"&",
"&",
"channel",
"num",
"<",
"channel",
"i",
"ds",
"size",
"(",
")",
")",
"{",
"channels",
"to",
"merge",
"this",
"step",
"clear",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"channels",
"to",
"merge",
"per",
"step",
"&",
"&",
"channel",
"num",
"<",
"channel",
"i",
"ds",
"size",
"(",
")",
";",
"i",
"+",
"+",
",",
"channel",
"num",
"+",
"+",
")",
"{",
"channels",
"to",
"merge",
"this",
"step",
"add",
"(",
"channel",
"i",
"ds",
"get",
"(",
"channel",
"num",
")",
")",
";",
"}",
"merged",
"channel",
"i",
"ds",
"add",
"(",
"merge",
"channels",
"(",
"channels",
"to",
"merge",
"this",
"step",
")",
")",
";",
"}",
"return",
"merged",
"channel",
"i",
"ds",
";",
"}"
] |
[
"sorts",
"the",
"elements",
"of",
"{",
"@",
"code",
"array",
"}",
"in",
"descending",
"order",
",",
"interpreting",
"them",
"as",
"unsigned",
"64",
"-",
"bit",
"integers"
] | [
"public",
"static",
"void",
"sort",
"descending",
"(",
"long",
"[",
"]",
"array",
")",
"{",
"check",
"not",
"null",
"(",
"array",
")",
";",
"sort",
"descending",
"(",
"array",
",",
"0",
",",
"array",
"length",
")",
";",
"}"
] |
[
"adjusts",
"the",
"upstream",
"{",
"@",
"link",
"format",
"}",
"(",
"i",
"e",
",",
"the",
"{",
"@",
"link",
"format",
"}",
"that",
"was",
"most",
"recently",
"passed",
"to",
"{",
"@",
"link",
"#",
"format",
"(",
"format",
")",
"}",
")",
"the",
"default",
"implementation",
"incorporates",
"the",
"sample",
"offset",
"passed",
"to",
"{",
"@",
"link",
"#",
"set",
"sample",
"offset",
"us",
"(",
"long",
")",
"}",
"into",
"{",
"@",
"link",
"format",
"#",
"subsample",
"offset",
"us",
"}"
] | [
"protected",
"format",
"get",
"adjusted",
"upstream",
"format",
"(",
"format",
"format",
")",
"{",
"if",
"(",
"sample",
"offset",
"us",
"!",
"=",
"0",
"&",
"&",
"format",
"subsample",
"offset",
"us",
"!",
"=",
"format",
"offset",
"sample",
"relative",
")",
"{",
"format",
"=",
"format",
"build",
"upon",
"(",
")",
"set",
"subsample",
"offset",
"us",
"(",
"format",
"subsample",
"offset",
"us",
"+",
"sample",
"offset",
"us",
")",
"build",
"(",
")",
";",
"}",
"return",
"format",
";",
"}"
] |
[
"set",
"the",
"number",
"of",
"map",
"tasks",
"for",
"this",
"job",
"note",
":",
"this",
"is",
"only",
"a",
"hint",
"to",
"the",
"framework",
"the",
"actual",
"number",
"of",
"spawned",
"map",
"tasks",
"depends",
"on",
"the",
"number",
"of",
"{",
"@",
"link",
"input",
"split",
"}",
"s",
"generated",
"by",
"the",
"job",
"'",
"s",
"{",
"@",
"link",
"input",
"format",
"#",
"get",
"splits",
"(",
"job",
"conf",
",",
"int",
")",
"}",
"a",
"custom",
"{",
"@",
"link",
"input",
"format",
"}",
"is",
"typically",
"used",
"to",
"accurately",
"control",
"the",
"number",
"of",
"map",
"tasks",
"for",
"the",
"job",
"<",
"b",
"id",
"=",
"\"",
"no",
"of",
"maps",
"\"",
">",
"how",
"many",
"maps",
"?",
"<",
"b",
">",
"the",
"number",
"of",
"maps",
"is",
"usually",
"driven",
"by",
"the",
"total",
"size",
"of",
"the",
"inputs",
"i",
"e",
"total",
"number",
"of",
"blocks",
"of",
"the",
"input",
"files",
"the",
"right",
"level",
"of",
"parallelism",
"for",
"maps",
"seems",
"to",
"be",
"around",
"10",
"-",
"100",
"maps",
"per",
"-",
"node",
",",
"although",
"it",
"has",
"been",
"set",
"up",
"to",
"300",
"or",
"so",
"for",
"very",
"cpu",
"-",
"light",
"map",
"tasks",
"task",
"setup",
"takes",
"awhile",
",",
"so",
"it",
"is",
"best",
"if",
"the",
"maps",
"take",
"at",
"least",
"a",
"minute",
"to",
"execute",
"the",
"default",
"behavior",
"of",
"file",
"-",
"based",
"{",
"@",
"link",
"input",
"format",
"}",
"s",
"is",
"to",
"split",
"the",
"input",
"into",
"logical",
"{",
"@",
"link",
"input",
"split",
"}",
"s",
"based",
"on",
"the",
"total",
"size",
",",
"in",
"bytes",
",",
"of",
"input",
"files",
"however",
",",
"the",
"{",
"@",
"link",
"file",
"system",
"}",
"blocksize",
"of",
"the",
"input",
"files",
"is",
"treated",
"as",
"an",
"upper",
"bound",
"for",
"input",
"splits",
"a",
"lower",
"bound",
"on",
"the",
"split",
"size",
"can",
"be",
"set",
"via",
"<",
"a",
"href",
"=",
"\"",
"{",
"@",
"doc",
"root",
"}",
"hadoop",
"-",
"mapreduce",
"-",
"clienthadoop",
"-",
"mapreduce",
"-",
"client",
"-",
"coremapred",
"-",
"default",
"xml",
"#",
"mapreduce",
"input",
"fileinputformat",
"split",
"minsize",
"\"",
">",
"mapreduce",
"input",
"fileinputformat",
"split",
"minsize",
"thus",
",",
"if",
"you",
"expect",
"10tb",
"of",
"input",
"data",
"and",
"have",
"a",
"blocksize",
"of",
"128mb",
",",
"you",
"'",
"ll",
"end",
"up",
"with",
"82",
",",
"000",
"maps",
",",
"unless",
"{",
"@",
"link",
"#",
"set",
"num",
"map",
"tasks",
"(",
"int",
")",
"}",
"is",
"used",
"to",
"set",
"it",
"even",
"higher"
] | [
"public",
"void",
"set",
"num",
"map",
"tasks",
"(",
"int",
"n",
")",
"{",
"set",
"int",
"(",
"job",
"context",
"num",
"maps",
",",
"n",
")",
";",
"}"
] |
[
"set",
"the",
"jca",
"activation",
"spec",
"to",
"use",
"for",
"activating",
"the",
"endpoint",
"note",
"that",
"this",
"activation",
"spec",
"instance",
"should",
"not",
"be",
"shared",
"across",
"multiple",
"resource",
"adapter",
"instances"
] | [
"public",
"void",
"set",
"activation",
"spec",
"(",
"@",
"nullable",
"activation",
"spec",
"activation",
"spec",
")",
"{",
"this",
"activation",
"spec",
"=",
"activation",
"spec",
";",
"}"
] |
[
"return",
"any",
"i",
"o",
"statistics",
"provided",
"by",
"the",
"underlying",
"stream"
] | [
"public",
"i",
"o",
"statistics",
"get",
"i",
"o",
"statistics",
"(",
")",
"{",
"return",
"i",
"o",
"statistics",
"support",
"retrieve",
"i",
"o",
"statistics",
"(",
"out",
")",
";",
"}"
] |
[
"order",
"by",
"process",
"definition",
"id",
"(",
"needs",
"to",
"be",
"followed",
"by",
"{",
"@",
"link",
"#",
"asc",
"(",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"desc",
"(",
")",
"}",
")"
] | [
"process",
"instance",
"query",
"order",
"by",
"process",
"definition",
"id",
"(",
")",
";"
] |
[
"manually",
"configure",
"the",
"handlers",
"to",
"check",
"for",
"the",
"presence",
"of",
"message",
"handling",
"methods",
",",
"which",
"also",
"disables",
"auto",
"-",
"detection",
"via",
"a",
"{",
"@",
"link",
"#",
"set",
"handler",
"predicate",
"(",
"predicate",
")",
"handler",
"predicate",
"}",
"if",
"you",
"do",
"not",
"want",
"to",
"disable",
"auto",
"-",
"detection",
",",
"then",
"call",
"this",
"method",
"first",
",",
"and",
"then",
"set",
"the",
"handler",
"predicate"
] | [
"public",
"void",
"set",
"handlers",
"(",
"list",
"<",
"object",
">",
"handlers",
")",
"{",
"this",
"handlers",
"=",
"handlers",
";",
"this",
"handler",
"predicate",
"=",
"null",
";",
"}"
] |
[
"transforms",
"the",
"field",
"set",
"into",
"an",
"array",
"of",
"field",
"i",
"ds",
"whether",
"the",
"i",
"ds",
"are",
"ordered",
"or",
"unordered",
"depends",
"on",
"the",
"specific",
"subclass",
"of",
"the",
"field",
"set"
] | [
"public",
"int",
"[",
"]",
"to",
"array",
"(",
")",
"{",
"int",
"[",
"]",
"a",
"=",
"new",
"int",
"[",
"this",
"collection",
"size",
"(",
")",
"]",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"int",
"col",
":",
"this",
"collection",
")",
"{",
"a",
"[",
"i",
"+",
"+",
"]",
"=",
"col",
";",
"}",
"return",
"a",
";",
"}"
] |
[
"creates",
"a",
"simple",
"name",
"representation",
"in",
"the",
"style",
"'",
"taskname",
"(",
"xy",
")",
"'",
",",
"where",
"'",
"taskname",
"'",
"is",
"the",
"name",
"as",
"returned",
"by",
"{",
"@",
"link",
"#",
"get",
"task",
"name",
"(",
")",
"}",
",",
"'",
"x",
"'",
"is",
"the",
"parallel",
"subtask",
"index",
"as",
"returned",
"by",
"{",
"@",
"link",
"#",
"get",
"parallel",
"subtask",
"index",
"(",
")",
"}",
"{",
"@",
"code",
"+",
"1",
"}",
",",
"and",
"'",
"y",
"'",
"is",
"the",
"total",
"number",
"of",
"tasks",
",",
"as",
"returned",
"by",
"{",
"@",
"link",
"#",
"get",
"total",
"number",
"of",
"parallel",
"subtasks",
"(",
")",
"}"
] | [
"public",
"string",
"get",
"task",
"name",
"with",
"subtask",
"index",
"(",
")",
"{",
"return",
"this",
"task",
"name",
"with",
"subtask",
";",
"}"
] |
[
"tests",
"that",
"when",
"the",
"first",
"option",
"is",
"valid",
"but",
"the",
"config",
"setting",
"doesn",
"'",
"t",
"match",
",",
"remaining",
"options",
"are",
"still",
"validity",
"-",
"checked"
] | [
"public",
"void",
"invalid",
"option",
"farther",
"down",
"(",
")",
"throws",
"exception",
"{",
"check",
"error",
"(",
"\"",
"foo",
"\"",
",",
"\"",
"badoption",
"\"",
",",
"\"",
"unknown",
"option",
":",
"'",
"not",
"an",
"option",
"'",
"\"",
",",
"\"",
"config",
"setting",
"(",
"\"",
",",
"\"",
"name",
"=",
"'",
"badoption",
"'",
",",
"\"",
",",
"\"",
"values",
"=",
"{",
"\"",
",",
"\"",
"'",
"compilation",
"mode",
"'",
":",
"'",
"opt",
"'",
",",
"\"",
",",
"\"",
"'",
"not",
"an",
"option",
"'",
":",
"'",
"bar",
"'",
",",
"\"",
",",
"\"",
"}",
")",
"\"",
")",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"map",
"boolean",
"'"
] | [
"public",
"void",
"map",
"boolean",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"map",
"boolean",
"}"
] |
[
"the",
"linker",
"is",
"biased",
"towards",
"server",
"spans",
",",
"or",
"client",
"spans",
"that",
"know",
"the",
"peer",
"local",
"endpoint",
"(",
")"
] | [
"public",
"void",
"when",
"server",
"labels",
"are",
"missing",
"kind",
"is",
"unknown",
"and",
"labels",
"are",
"cleared",
"(",
")",
"{",
"dependency",
"link",
"v",
"2",
"span",
"iterator",
"iterator",
"=",
"iterator",
"(",
"new",
"record",
"(",
")",
"values",
"(",
"trace",
"id",
"high",
",",
"trace",
"id",
",",
"parent",
"id",
",",
"span",
"id",
",",
"\"",
"ca",
"\"",
",",
"type",
"boolean",
",",
"\"",
"s",
"1",
"\"",
")",
")",
";",
"span",
"span",
"=",
"iterator",
"next",
"(",
")",
";",
"assert",
"that",
"(",
"span",
"kind",
"(",
")",
")",
"is",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"span",
"local",
"endpoint",
"(",
")",
")",
"is",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"span",
"remote",
"endpoint",
"(",
")",
")",
"is",
"null",
"(",
")",
";",
"}"
] |
[
"a",
"function",
"to",
"translate",
"output",
"from",
"the",
"vagrant",
"command",
"execution",
"to",
"the",
"progress",
"line",
"the",
"function",
"takes",
"the",
"current",
"line",
"of",
"output",
"from",
"vagrant",
",",
"and",
"returns",
"a",
"new",
"progress",
"line",
",",
"or",
"{",
"@",
"code",
"null",
"}",
"if",
"there",
"is",
"no",
"update"
] | [
"public",
"void",
"set",
"progress",
"handler",
"(",
"unary",
"operator",
"<",
"string",
">",
"progress",
"handler",
")",
"{",
"this",
"progress",
"handler",
"=",
"progress",
"handler",
";",
"}"
] |
[
"invokes",
"{",
"@",
"link",
"audio",
"renderer",
"event",
"listener",
"#",
"on",
"audio",
"session",
"id",
"(",
"int",
")",
"}"
] | [
"public",
"void",
"audio",
"session",
"id",
"(",
"int",
"audio",
"session",
"id",
")",
"{",
"if",
"(",
"handler",
"!",
"=",
"null",
")",
"{",
"handler",
"post",
"(",
"(",
")",
"-",
">",
"cast",
"non",
"null",
"(",
"listener",
")",
"on",
"audio",
"session",
"id",
"(",
"audio",
"session",
"id",
")",
")",
";",
"}",
"}"
] |
[
"creates",
"a",
"new",
"resource",
"resolver",
"the",
"return",
"value",
"is",
"{",
"@",
"code",
"null",
"}",
"iff",
"{",
"@",
"link",
"#",
"unavailability",
"cause",
"(",
")",
"}",
"is",
"not",
"null",
";"
] | [
"@",
"nullable",
"resource",
"resolver",
"new",
"resource",
"resolver",
"(",
")",
";"
] |
[
"converts",
"the",
"json",
"document",
"in",
"{",
"@",
"code",
"in",
"}",
"to",
"a",
"java",
"object",
"unlike",
"gson",
"'",
"s",
"similar",
"{",
"@",
"link",
"gson",
"#",
"from",
"json",
"(",
"java",
"io",
"reader",
",",
"class",
")",
"from",
"json",
"}",
"method",
",",
"this",
"read",
"is",
"strict",
"create",
"a",
"{",
"@",
"link",
"json",
"reader",
"#",
"set",
"lenient",
"(",
"boolean",
")",
"lenient",
"}",
"{",
"@",
"code",
"json",
"reader",
"}",
"and",
"call",
"{",
"@",
"link",
"#",
"read",
"(",
"json",
"reader",
")",
"}",
"for",
"lenient",
"reading"
] | [
"public",
"final",
"t",
"from",
"json",
"(",
"reader",
"in",
")",
"throws",
"i",
"o",
"exception",
"{",
"json",
"reader",
"reader",
"=",
"new",
"json",
"reader",
"(",
"in",
")",
";",
"return",
"read",
"(",
"reader",
")",
";",
"}"
] |
[
"cascades",
"of",
"joins",
"with",
"partially",
"blocking",
",",
"partially",
"pipelined",
"exchanges",
"(",
"1",
")",
"-",
"-",
"+",
"+",
"-",
"-",
"(",
"5",
")",
"-",
"+",
"(",
"2",
")",
"-",
"-",
"+",
"|",
"(",
"blocking",
")",
"|",
"+",
"-",
"-",
"(",
"7",
")",
"|",
"(",
"blocking",
")",
"(",
"3",
")",
"-",
"-",
"+",
"|",
"+",
"-",
"-",
"(",
"6",
")",
"-",
"+",
"(",
"4",
")",
"-",
"-",
"+",
"component",
"1",
":",
"1",
",",
"2",
",",
"5",
";",
"component",
"2",
":",
"3",
",",
"4",
",",
"6",
";",
"component",
"3",
":",
"7"
] | [
"public",
"void",
"test",
"multiple",
"components",
"via",
"cascade",
"of",
"joins",
"(",
")",
"{",
"testing",
"scheduling",
"topology",
"topology",
"=",
"new",
"testing",
"scheduling",
"topology",
"(",
")",
";",
"testing",
"scheduling",
"execution",
"vertex",
"v",
"1",
"=",
"topology",
"new",
"execution",
"vertex",
"(",
")",
";",
"testing",
"scheduling",
"execution",
"vertex",
"v",
"2",
"=",
"topology",
"new",
"execution",
"vertex",
"(",
")",
";",
"testing",
"scheduling",
"execution",
"vertex",
"v",
"3",
"=",
"topology",
"new",
"execution",
"vertex",
"(",
")",
";",
"testing",
"scheduling",
"execution",
"vertex",
"v",
"4",
"=",
"topology",
"new",
"execution",
"vertex",
"(",
")",
";",
"testing",
"scheduling",
"execution",
"vertex",
"v",
"5",
"=",
"topology",
"new",
"execution",
"vertex",
"(",
")",
";",
"testing",
"scheduling",
"execution",
"vertex",
"v",
"6",
"=",
"topology",
"new",
"execution",
"vertex",
"(",
")",
";",
"testing",
"scheduling",
"execution",
"vertex",
"v",
"7",
"=",
"topology",
"new",
"execution",
"vertex",
"(",
")",
";",
"topology",
"connect",
"(",
"v",
"1",
",",
"v",
"5",
",",
"result",
"partition",
"type",
"pipelined",
")",
"connect",
"(",
"v",
"2",
",",
"v",
"5",
",",
"result",
"partition",
"type",
"pipelined",
")",
"connect",
"(",
"v",
"3",
",",
"v",
"6",
",",
"result",
"partition",
"type",
"pipelined",
")",
"connect",
"(",
"v",
"4",
",",
"v",
"6",
",",
"result",
"partition",
"type",
"pipelined",
")",
"connect",
"(",
"v",
"5",
",",
"v",
"7",
",",
"result",
"partition",
"type",
"blocking",
")",
"connect",
"(",
"v",
"6",
",",
"v",
"7",
",",
"result",
"partition",
"type",
"blocking",
")",
";",
"map",
"<",
"execution",
"vertex",
"i",
"d",
",",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
">",
"pipelined",
"region",
"by",
"vertex",
"=",
"compute",
"pipelined",
"region",
"by",
"vertex",
"(",
"topology",
")",
";",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
"r",
"1",
"=",
"pipelined",
"region",
"by",
"vertex",
"get",
"(",
"v",
"1",
"get",
"id",
"(",
")",
")",
";",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
"r",
"2",
"=",
"pipelined",
"region",
"by",
"vertex",
"get",
"(",
"v",
"2",
"get",
"id",
"(",
")",
")",
";",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
"r",
"3",
"=",
"pipelined",
"region",
"by",
"vertex",
"get",
"(",
"v",
"3",
"get",
"id",
"(",
")",
")",
";",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
"r",
"4",
"=",
"pipelined",
"region",
"by",
"vertex",
"get",
"(",
"v",
"4",
"get",
"id",
"(",
")",
")",
";",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
"r",
"5",
"=",
"pipelined",
"region",
"by",
"vertex",
"get",
"(",
"v",
"5",
"get",
"id",
"(",
")",
")",
";",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
"r",
"6",
"=",
"pipelined",
"region",
"by",
"vertex",
"get",
"(",
"v",
"6",
"get",
"id",
"(",
")",
")",
";",
"set",
"<",
"scheduling",
"execution",
"vertex",
">",
"r",
"7",
"=",
"pipelined",
"region",
"by",
"vertex",
"get",
"(",
"v",
"7",
"get",
"id",
"(",
")",
")",
";",
"assert",
"same",
"region",
"(",
"r",
"1",
",",
"r",
"2",
",",
"r",
"5",
")",
";",
"assert",
"same",
"region",
"(",
"r",
"3",
",",
"r",
"4",
",",
"r",
"6",
")",
";",
"assert",
"distinct",
"regions",
"(",
"r",
"1",
",",
"r",
"3",
",",
"r",
"7",
")",
";",
"}"
] |
[
"convenience",
"method",
"to",
"return",
"a",
"collection",
"as",
"a",
"csv",
"string",
"e",
"g",
"useful",
"for",
"<",
"code",
">",
"to",
"string",
"(",
")",
"<",
"code",
">",
"implementations"
] | [
"public",
"static",
"string",
"collection",
"to",
"comma",
"delimited",
"string",
"(",
"iterable",
"<",
"?",
">",
"coll",
")",
"{",
"return",
"collection",
"to",
"delimited",
"string",
"(",
"coll",
",",
"\"",
",",
"\"",
")",
";",
"}"
] |
[
"get",
"big",
"decimal"
] | [
"public",
"big",
"decimal",
"get",
"big",
"decimal",
"(",
")",
"{",
"return",
"big",
"decimal",
";",
"}"
] |
[
"verifies",
"that",
"parent",
"directory",
"is",
"correct",
"after",
"a",
"failed",
"call",
"to",
"mkdir"
] | [
"private",
"void",
"rename",
"check",
"parent",
"directory",
"(",
"string",
"name",
",",
"string",
"dst",
",",
"string",
"parent",
"dir",
"name",
",",
"class",
"<",
"?",
">",
"expected",
")",
"throws",
"exception",
"{",
"verify",
"(",
"rename",
"(",
"name",
",",
"dst",
",",
"expected",
")",
",",
"parent",
"dir",
"name",
")",
";",
"}"
] |
[
"calculate",
"matrix",
"for",
"fit",
"center"
] | [
"private",
"void",
"update",
"base",
"matrix",
"(",
"drawable",
"drawable",
")",
"{",
"if",
"(",
"drawable",
"=",
"=",
"null",
")",
"{",
"return",
";",
"}",
"final",
"float",
"view",
"width",
"=",
"get",
"image",
"view",
"width",
"(",
"m",
"image",
"view",
")",
";",
"final",
"float",
"view",
"height",
"=",
"get",
"image",
"view",
"height",
"(",
"m",
"image",
"view",
")",
";",
"final",
"int",
"drawable",
"width",
"=",
"drawable",
"get",
"intrinsic",
"width",
"(",
")",
";",
"final",
"int",
"drawable",
"height",
"=",
"drawable",
"get",
"intrinsic",
"height",
"(",
")",
";",
"m",
"base",
"matrix",
"reset",
"(",
")",
";",
"final",
"float",
"width",
"scale",
"=",
"view",
"width",
"/",
"drawable",
"width",
";",
"final",
"float",
"height",
"scale",
"=",
"view",
"height",
"/",
"drawable",
"height",
";",
"if",
"(",
"m",
"scale",
"type",
"=",
"=",
"scale",
"type",
"center",
")",
"{",
"m",
"base",
"matrix",
"post",
"translate",
"(",
"(",
"view",
"width",
"-",
"drawable",
"width",
")",
"/",
"2f",
",",
"(",
"view",
"height",
"-",
"drawable",
"height",
")",
"/",
"2f",
")",
";",
"}",
"else",
"if",
"(",
"m",
"scale",
"type",
"=",
"=",
"scale",
"type",
"center",
"crop",
")",
"{",
"float",
"scale",
"=",
"math",
"max",
"(",
"width",
"scale",
",",
"height",
"scale",
")",
";",
"m",
"base",
"matrix",
"post",
"scale",
"(",
"scale",
",",
"scale",
")",
";",
"m",
"base",
"matrix",
"post",
"translate",
"(",
"(",
"view",
"width",
"-",
"drawable",
"width",
"*",
"scale",
")",
"/",
"2f",
",",
"(",
"view",
"height",
"-",
"drawable",
"height",
"*",
"scale",
")",
"/",
"2f",
")",
";",
"}",
"else",
"if",
"(",
"m",
"scale",
"type",
"=",
"=",
"scale",
"type",
"center",
"inside",
")",
"{",
"float",
"scale",
"=",
"math",
"min",
"(",
"1",
"0f",
",",
"math",
"min",
"(",
"width",
"scale",
",",
"height",
"scale",
")",
")",
";",
"m",
"base",
"matrix",
"post",
"scale",
"(",
"scale",
",",
"scale",
")",
";",
"m",
"base",
"matrix",
"post",
"translate",
"(",
"(",
"view",
"width",
"-",
"drawable",
"width",
"*",
"scale",
")",
"/",
"2f",
",",
"(",
"view",
"height",
"-",
"drawable",
"height",
"*",
"scale",
")",
"/",
"2f",
")",
";",
"}",
"else",
"{",
"rect",
"f",
"m",
"temp",
"src",
"=",
"new",
"rect",
"f",
"(",
"0",
",",
"0",
",",
"drawable",
"width",
",",
"drawable",
"height",
")",
";",
"rect",
"f",
"m",
"temp",
"dst",
"=",
"new",
"rect",
"f",
"(",
"0",
",",
"0",
",",
"view",
"width",
",",
"view",
"height",
")",
";",
"if",
"(",
"(",
"int",
")",
"m",
"base",
"rotation",
"%",
"180",
"!",
"=",
"0",
")",
"{",
"m",
"temp",
"src",
"=",
"new",
"rect",
"f",
"(",
"0",
",",
"0",
",",
"drawable",
"height",
",",
"drawable",
"width",
")",
";",
"}",
"switch",
"(",
"m",
"scale",
"type",
")",
"{",
"case",
"fit",
"center",
":",
"m",
"base",
"matrix",
"set",
"rect",
"to",
"rect",
"(",
"m",
"temp",
"src",
",",
"m",
"temp",
"dst",
",",
"scale",
"to",
"fit",
"center",
")",
";",
"break",
";",
"case",
"fit",
"start",
":",
"m",
"base",
"matrix",
"set",
"rect",
"to",
"rect",
"(",
"m",
"temp",
"src",
",",
"m",
"temp",
"dst",
",",
"scale",
"to",
"fit",
"start",
")",
";",
"break",
";",
"case",
"fit",
"end",
":",
"m",
"base",
"matrix",
"set",
"rect",
"to",
"rect",
"(",
"m",
"temp",
"src",
",",
"m",
"temp",
"dst",
",",
"scale",
"to",
"fit",
"end",
")",
";",
"break",
";",
"case",
"fit",
"xy",
":",
"m",
"base",
"matrix",
"set",
"rect",
"to",
"rect",
"(",
"m",
"temp",
"src",
",",
"m",
"temp",
"dst",
",",
"scale",
"to",
"fit",
"fill",
")",
";",
"break",
";",
"default",
":",
"break",
";",
"}",
"}",
"reset",
"matrix",
"(",
")",
";",
"}"
] |
[
"tells",
"whether",
"if",
"is",
"a",
"near",
"address"
] | [
"public",
"boolean",
"is",
"near",
"(",
")",
"{",
"return",
"(",
"mode",
"=",
"=",
"address",
"mode",
"near",
")",
";",
"}"
] |
[
"test",
"unsubscribing",
"the",
"concatenated",
"observable",
"in",
"a",
"single",
"thread"
] | [
"public",
"void",
"concat",
"unsubscribe",
"(",
")",
"{",
"final",
"count",
"down",
"latch",
"call",
"once",
"=",
"new",
"count",
"down",
"latch",
"(",
"1",
")",
";",
"final",
"count",
"down",
"latch",
"ok",
"to",
"continue",
"=",
"new",
"count",
"down",
"latch",
"(",
"1",
")",
";",
"final",
"test",
"observable",
"<",
"string",
">",
"w",
"1",
"=",
"new",
"test",
"observable",
"<",
">",
"(",
"\"",
"one",
"\"",
",",
"\"",
"two",
"\"",
",",
"\"",
"three",
"\"",
")",
";",
"final",
"test",
"observable",
"<",
"string",
">",
"w",
"2",
"=",
"new",
"test",
"observable",
"<",
">",
"(",
"call",
"once",
",",
"ok",
"to",
"continue",
",",
"\"",
"four",
"\"",
",",
"\"",
"five",
"\"",
",",
"\"",
"six",
"\"",
")",
";",
"observer",
"<",
"string",
">",
"observer",
"=",
"test",
"helper",
"mock",
"observer",
"(",
")",
";",
"test",
"observer",
"<",
"string",
">",
"to",
"=",
"new",
"test",
"observer",
"<",
">",
"(",
"observer",
")",
";",
"final",
"observable",
"<",
"string",
">",
"concat",
"=",
"observable",
"concat",
"(",
"observable",
"unsafe",
"create",
"(",
"w",
"1",
")",
",",
"observable",
"unsafe",
"create",
"(",
"w",
"2",
")",
")",
";",
"try",
"{",
"/",
"/",
"subscribe",
"concat",
"subscribe",
"(",
"to",
")",
";",
"/",
"/",
"block",
"main",
"thread",
"to",
"allow",
"observable",
"\"",
"w",
"1",
"\"",
"to",
"complete",
"and",
"observable",
"\"",
"w",
"2",
"\"",
"to",
"call",
"on",
"next",
"once",
"call",
"once",
"await",
"(",
")",
";",
"/",
"/",
"unsubcribe",
"to",
"dispose",
"(",
")",
";",
"/",
"/",
"unblock",
"the",
"observable",
"to",
"continue",
"ok",
"to",
"continue",
"count",
"down",
"(",
")",
";",
"w",
"1",
"t",
"join",
"(",
")",
";",
"w",
"2",
"t",
"join",
"(",
")",
";",
"}",
"catch",
"(",
"throwable",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"fail",
"(",
"e",
"get",
"message",
"(",
")",
")",
";",
"}",
"in",
"order",
"in",
"order",
"=",
"in",
"order",
"(",
"observer",
")",
";",
"in",
"order",
"verify",
"(",
"observer",
",",
"times",
"(",
"1",
")",
")",
"on",
"next",
"(",
"\"",
"one",
"\"",
")",
";",
"in",
"order",
"verify",
"(",
"observer",
",",
"times",
"(",
"1",
")",
")",
"on",
"next",
"(",
"\"",
"two",
"\"",
")",
";",
"in",
"order",
"verify",
"(",
"observer",
",",
"times",
"(",
"1",
")",
")",
"on",
"next",
"(",
"\"",
"three",
"\"",
")",
";",
"in",
"order",
"verify",
"(",
"observer",
",",
"times",
"(",
"1",
")",
")",
"on",
"next",
"(",
"\"",
"four",
"\"",
")",
";",
"in",
"order",
"verify",
"(",
"observer",
",",
"never",
"(",
")",
")",
"on",
"next",
"(",
"\"",
"five",
"\"",
")",
";",
"in",
"order",
"verify",
"(",
"observer",
",",
"never",
"(",
")",
")",
"on",
"next",
"(",
"\"",
"six",
"\"",
")",
";",
"in",
"order",
"verify",
"(",
"observer",
",",
"never",
"(",
")",
")",
"on",
"complete",
"(",
")",
";",
"}"
] |
[
"process",
"a",
"data",
"reference",
"for",
"possible",
"indirection",
"update",
"block",
"reference",
"queue",
"with",
"indirect",
"block",
"references"
] | [
"private",
"static",
"int",
"follow",
"indirection",
"(",
"linked",
"list",
"<",
"code",
"block",
"reference",
"impl",
">",
"block",
"ref",
"queue",
",",
"boolean",
"include",
"externals",
",",
"code",
"block",
"src",
"block",
",",
"reference",
"src",
"ref",
",",
"flow",
"type",
"indirect",
"flow",
"type",
",",
"task",
"monitor",
"monitor",
")",
"throws",
"cancelled",
"exception",
"{",
"simple",
"block",
"model",
"model",
"=",
"(",
"simple",
"block",
"model",
")",
"src",
"block",
"get",
"model",
"(",
")",
";",
"address",
"addr",
"=",
"src",
"ref",
"get",
"to",
"address",
"(",
")",
";",
"listing",
"listing",
"=",
"model",
"get",
"listing",
"(",
")",
";",
"data",
"data",
"=",
"listing",
"get",
"defined",
"data",
"containing",
"(",
"addr",
")",
";",
"if",
"(",
"data",
"=",
"=",
"null",
")",
"return",
"0",
";",
"int",
"cnt",
"=",
"0",
";",
"/",
"/",
"?",
"?",
"handle",
"special",
"cases",
"-",
"offset",
"is",
"0",
"within",
"array",
"of",
"pointers",
",",
"or",
"offset",
"to",
"pointer",
"within",
"array",
"of",
"structures",
"int",
"offset",
"=",
"(",
"int",
")",
"addr",
"subtract",
"(",
"data",
"get",
"min",
"address",
"(",
")",
")",
";",
"data",
"primitive",
"=",
"data",
"get",
"primitive",
"at",
"(",
"offset",
")",
";",
"if",
"(",
"primitive",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"follow",
"pointer",
"-",
"could",
"have",
"multiple",
"references",
"reference",
"refs",
"[",
"]",
"=",
"primitive",
"get",
"references",
"from",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"refs",
"length",
";",
"i",
"+",
"+",
")",
"{",
"monitor",
"check",
"canceled",
"(",
")",
";",
"code",
"block",
"dest",
"block",
"=",
"null",
";",
"address",
"to",
"addr",
"=",
"refs",
"[",
"i",
"]",
"get",
"to",
"address",
"(",
")",
";",
"if",
"(",
"to",
"addr",
"is",
"memory",
"address",
"(",
")",
")",
"{",
"code",
"unit",
"cu",
"=",
"listing",
"get",
"code",
"unit",
"at",
"(",
"to",
"addr",
")",
";",
"if",
"(",
"cu",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"handle",
"instruction",
"reference",
"if",
"(",
"cu",
"instanceof",
"instruction",
")",
"{",
"if",
"(",
"block",
"ref",
"queue",
"!",
"=",
"null",
")",
"{",
"dest",
"block",
"=",
"model",
"get",
"first",
"code",
"block",
"containing",
"(",
"to",
"addr",
",",
"monitor",
")",
";",
"}",
"}",
"/",
"/",
"skip",
"indirect",
"defined",
"-",
"data",
"destinations",
"else",
"if",
"(",
"(",
"cu",
"instanceof",
"data",
")",
"&",
"&",
"(",
"(",
"data",
")",
"cu",
")",
"is",
"defined",
"(",
")",
")",
"{",
"continue",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"to",
"addr",
"is",
"external",
"address",
"(",
")",
")",
"{",
"if",
"(",
"!",
"include",
"externals",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"block",
"ref",
"queue",
"!",
"=",
"null",
")",
"{",
"dest",
"block",
"=",
"model",
"get",
"first",
"code",
"block",
"containing",
"(",
"to",
"addr",
",",
"monitor",
")",
";",
"}",
"}",
"/",
"/",
"queue",
"block",
"reference",
"if",
"(",
"block",
"ref",
"queue",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"dest",
"block",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"means",
"that",
"there",
"will",
"not",
"be",
"a",
"good",
"destination",
"block",
"there",
",",
"/",
"/",
"make",
"an",
"invalid",
"destination",
"block",
"/",
"/",
"todo",
":",
"this",
"might",
"not",
"be",
"the",
"right",
"thing",
"to",
"do",
"return",
"a",
"/",
"/",
"code",
"block",
"that",
"really",
"isn",
"'",
"t",
"there",
",",
"but",
"should",
"be",
"if",
"/",
"/",
"there",
"were",
"valid",
"instructions",
"if",
"you",
"got",
"it",
"'",
"s",
"start",
"/",
"/",
"address",
"then",
"got",
"the",
"block",
"starting",
"at",
"from",
"the",
"model",
",",
"/",
"/",
"you",
"would",
"get",
"null",
",",
"so",
"maybe",
"the",
"model",
"should",
"be",
"changed",
"/",
"/",
"to",
"return",
"a",
"block",
"at",
"this",
"address",
"/",
"/",
"create",
"artificial",
"block",
"at",
"bad",
"destination",
"dest",
"block",
"=",
"model",
"create",
"simple",
"data",
"block",
"(",
"to",
"addr",
",",
"to",
"addr",
")",
";",
"}",
"block",
"ref",
"queue",
"add",
"(",
"new",
"code",
"block",
"reference",
"impl",
"(",
"src",
"block",
",",
"dest",
"block",
",",
"indirect",
"flow",
"type",
",",
"to",
"addr",
",",
"src",
"ref",
"get",
"from",
"address",
"(",
")",
")",
")",
";",
"}",
"+",
"+",
"cnt",
";",
"}",
"}",
"return",
"cnt",
";",
"}"
] |
[
"writes",
"content",
"value",
"must",
"use",
"native",
"content",
"representation"
] | [
"void",
"write",
"stream",
"value",
"(",
"d",
"b",
"r",
"progress",
"monitor",
"monitor",
",",
"@",
"not",
"null",
"d",
"b",
"p",
"data",
"source",
"data",
"source",
",",
"@",
"not",
"null",
"d",
"b",
"s",
"typed",
"object",
"type",
",",
"@",
"not",
"null",
"d",
"b",
"d",
"content",
"object",
",",
"@",
"not",
"null",
"writer",
"writer",
")",
"throws",
"d",
"b",
"c",
"exception",
",",
"i",
"o",
"exception",
";"
] |
[
"check",
"that",
"we",
"can",
"provide",
"a",
"common",
"interceptor",
"that",
"will",
"appear",
"in",
"the",
"chain",
"before",
"\"",
"specific",
"\"",
"interceptors",
",",
"which",
"are",
"sourced",
"from",
"matching",
"advisors"
] | [
"public",
"void",
"test",
"common",
"interceptor",
"and",
"advisor",
"(",
")",
"throws",
"exception",
"{",
"bean",
"factory",
"bf",
"=",
"new",
"class",
"path",
"xml",
"application",
"context",
"(",
"common",
"interceptors",
"context",
",",
"class",
")",
";",
"i",
"test",
"bean",
"test",
"1",
"=",
"(",
"i",
"test",
"bean",
")",
"bf",
"get",
"bean",
"(",
"\"",
"test",
"1",
"\"",
")",
";",
"assert",
"that",
"(",
"aop",
"utils",
"is",
"aop",
"proxy",
"(",
"test",
"1",
")",
")",
"is",
"true",
"(",
")",
";",
"lockable",
"lockable",
"1",
"=",
"(",
"lockable",
")",
"test",
"1",
";",
"nop",
"interceptor",
"nop",
"1",
"=",
"(",
"nop",
"interceptor",
")",
"bf",
"get",
"bean",
"(",
"\"",
"nop",
"interceptor",
"\"",
")",
";",
"nop",
"interceptor",
"nop",
"2",
"=",
"(",
"nop",
"interceptor",
")",
"bf",
"get",
"bean",
"(",
"\"",
"pointcut",
"advisor",
"\"",
",",
"advisor",
"class",
")",
"get",
"advice",
"(",
")",
";",
"i",
"test",
"bean",
"test",
"2",
"=",
"(",
"i",
"test",
"bean",
")",
"bf",
"get",
"bean",
"(",
"\"",
"test",
"2",
"\"",
")",
";",
"lockable",
"lockable",
"2",
"=",
"(",
"lockable",
")",
"test",
"2",
";",
"/",
"/",
"locking",
"should",
"be",
"independent",
";",
"nop",
"is",
"shared",
"assert",
"that",
"(",
"lockable",
"1",
"locked",
"(",
")",
")",
"is",
"false",
"(",
")",
";",
"assert",
"that",
"(",
"lockable",
"2",
"locked",
"(",
")",
")",
"is",
"false",
"(",
")",
";",
"/",
"/",
"equals",
"2",
"calls",
"on",
"shared",
"nop",
",",
"because",
"it",
"'",
"s",
"first",
"and",
"sees",
"calls",
"/",
"/",
"against",
"the",
"lockable",
"interface",
"introduced",
"by",
"the",
"specific",
"advisor",
"assert",
"that",
"(",
"nop",
"1",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"2",
")",
";",
"assert",
"that",
"(",
"nop",
"2",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"0",
")",
";",
"lockable",
"1",
"lock",
"(",
")",
";",
"assert",
"that",
"(",
"lockable",
"1",
"locked",
"(",
")",
")",
"is",
"true",
"(",
")",
";",
"assert",
"that",
"(",
"lockable",
"2",
"locked",
"(",
")",
")",
"is",
"false",
"(",
")",
";",
"assert",
"that",
"(",
"nop",
"1",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"5",
")",
";",
"assert",
"that",
"(",
"nop",
"2",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"0",
")",
";",
"package",
"visible",
"method",
"package",
"visible",
"method",
"=",
"(",
"package",
"visible",
"method",
")",
"bf",
"get",
"bean",
"(",
"\"",
"package",
"visible",
"method",
"\"",
")",
";",
"assert",
"that",
"(",
"nop",
"1",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"5",
")",
";",
"assert",
"that",
"(",
"nop",
"2",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"0",
")",
";",
"package",
"visible",
"method",
"do",
"something",
"(",
")",
";",
"assert",
"that",
"(",
"nop",
"1",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"6",
")",
";",
"assert",
"that",
"(",
"nop",
"2",
"get",
"count",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"1",
")",
";",
"boolean",
"condition",
"=",
"package",
"visible",
"method",
"instanceof",
"lockable",
";",
"assert",
"that",
"(",
"condition",
")",
"is",
"true",
"(",
")",
";",
"lockable",
"lockable",
"3",
"=",
"(",
"lockable",
")",
"package",
"visible",
"method",
";",
"lockable",
"3",
"lock",
"(",
")",
";",
"assert",
"that",
"(",
"lockable",
"3",
"locked",
"(",
")",
")",
"is",
"true",
"(",
")",
";",
"lockable",
"3",
"unlock",
"(",
")",
";",
"assert",
"that",
"(",
"lockable",
"3",
"locked",
"(",
")",
")",
"is",
"false",
"(",
")",
";",
"}"
] |
[
"sets",
"the",
"<",
"code",
">",
"bar",
"<",
"code",
">",
"property",
"<",
"br",
">",
"n",
"b",
"<",
"code",
">",
"bar",
"<",
"code",
">",
"is",
"<",
"b",
">",
"read",
"only",
"<",
"b",
">",
";",
"client",
"code",
"should",
"not",
"call",
"this",
"method"
] | [
"public",
"void",
"set",
"bar",
"(",
"string",
"bar",
")",
"{",
"this",
"bar",
"=",
"bar",
";",
"}"
] |
[
"sets",
"the",
"background",
"image",
"if",
"allowed"
] | [
"public",
"void",
"set",
"background",
"image",
"(",
"@",
"nullable",
"drawable",
"drawable",
")",
"{",
"set",
"child",
"drawable",
"at",
"index",
"(",
"background",
"image",
"index",
",",
"drawable",
")",
";",
"}"
] |
[
"test",
"get",
"has",
"result",
"with",
"throwable",
"with",
"message"
] | [
"public",
"void",
"test",
"get",
"has",
"result",
"with",
"throwable",
"with",
"message",
"(",
")",
"throws",
"exception",
"{",
"message",
"future",
"message",
"future",
"=",
"new",
"message",
"future",
"(",
")",
";",
"message",
"future",
"set",
"request",
"message",
"(",
"build",
"repc",
"message",
"(",
")",
")",
";",
"message",
"future",
"set",
"timeout",
"(",
"time",
"out",
"field",
")",
";",
"throwable",
"throwable",
"=",
"new",
"throwable",
"(",
"\"",
"test",
"throwable",
"\"",
")",
";",
"message",
"future",
"set",
"result",
"message",
"(",
"throwable",
")",
";",
"try",
"{",
"message",
"future",
"get",
"(",
"time",
"out",
"field",
",",
"time",
"unit",
"milliseconds",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"assert",
"that",
"(",
"e",
"get",
"message",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"new",
"runtime",
"exception",
"(",
"throwable",
")",
"get",
"message",
"(",
")",
")",
";",
"}",
"}"
] |
[
"tests",
"that",
"when",
"the",
"node",
"returns",
"a",
"shard",
"lock",
"obtain",
"failed",
"exception",
",",
"it",
"will",
"be",
"considered",
"as",
"a",
"valid",
"shard",
"copy"
] | [
"public",
"void",
"test",
"shard",
"lock",
"obtain",
"failed",
"exception",
"(",
")",
"{",
"final",
"routing",
"allocation",
"allocation",
"=",
"routing",
"allocation",
"with",
"one",
"primary",
"no",
"replicas",
"(",
"yes",
"allocation",
"deciders",
"(",
")",
",",
"cluster",
"recovered",
",",
"\"",
"alloc",
"id",
"1",
"\"",
")",
";",
"test",
"allocator",
"add",
"data",
"(",
"node",
"1",
",",
"\"",
"alloc",
"id",
"1",
"\"",
",",
"random",
"boolean",
"(",
")",
",",
"new",
"shard",
"lock",
"obtain",
"failed",
"exception",
"(",
"shard",
"id",
",",
"\"",
"test",
"\"",
")",
")",
";",
"allocate",
"all",
"unassigned",
"(",
"allocation",
")",
";",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"changed",
"(",
")",
",",
"equal",
"to",
"(",
"true",
")",
")",
";",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"(",
")",
"unassigned",
"(",
")",
"ignored",
"(",
")",
"is",
"empty",
"(",
")",
",",
"equal",
"to",
"(",
"true",
")",
")",
";",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"(",
")",
"shards",
"with",
"state",
"(",
"shard",
"routing",
"state",
"initializing",
")",
"size",
"(",
")",
",",
"equal",
"to",
"(",
"1",
")",
")",
";",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"(",
")",
"shards",
"with",
"state",
"(",
"shard",
"routing",
"state",
"initializing",
")",
"get",
"(",
"0",
")",
"current",
"node",
"id",
"(",
")",
",",
"equal",
"to",
"(",
"node",
"1",
"get",
"id",
"(",
")",
")",
")",
";",
"/",
"/",
"check",
"that",
"allocation",
"id",
"is",
"reused",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"(",
")",
"shards",
"with",
"state",
"(",
"shard",
"routing",
"state",
"initializing",
")",
"get",
"(",
"0",
")",
"allocation",
"id",
"(",
")",
"get",
"id",
"(",
")",
",",
"equal",
"to",
"(",
"\"",
"alloc",
"id",
"1",
"\"",
")",
")",
";",
"assert",
"cluster",
"health",
"status",
"(",
"allocation",
",",
"cluster",
"health",
"status",
"yellow",
")",
";",
"}"
] |
[
"on",
"a",
"concurrent",
"computation",
"that",
"throws",
"an",
"unchecked",
"exception",
",",
"all",
"threads",
"should",
"get",
"the",
"(",
"wrapped",
")",
"exception",
",",
"with",
"the",
"loader",
"called",
"only",
"once",
"the",
"result",
"should",
"not",
"be",
"cached",
"(",
"a",
"later",
"request",
"should",
"call",
"the",
"loader",
"again",
")"
] | [
"private",
"static",
"void",
"test",
"concurrent",
"loading",
"unchecked",
"exception",
"(",
"caffeine",
"<",
"object",
",",
"object",
">",
"builder",
")",
"throws",
"interrupted",
"exception",
"{",
"int",
"count",
"=",
"10",
";",
"final",
"atomic",
"integer",
"call",
"count",
"=",
"new",
"atomic",
"integer",
"(",
")",
";",
"final",
"count",
"down",
"latch",
"start",
"signal",
"=",
"new",
"count",
"down",
"latch",
"(",
"count",
"+",
"1",
")",
";",
"final",
"runtime",
"exception",
"e",
"=",
"new",
"runtime",
"exception",
"(",
")",
";",
"loading",
"cache",
"<",
"string",
",",
"string",
">",
"cache",
"=",
"caffeinated",
"guava",
"build",
"(",
"builder",
",",
"new",
"cache",
"loader",
"<",
"string",
",",
"string",
">",
"(",
")",
"{",
"@",
"override",
"public",
"string",
"load",
"(",
"string",
"key",
")",
"{",
"call",
"count",
"increment",
"and",
"get",
"(",
")",
";",
"assert",
"true",
"(",
"uninterruptibles",
"await",
"uninterruptibly",
"(",
"start",
"signal",
",",
"300",
",",
"time",
"unit",
"seconds",
")",
")",
";",
"throw",
"e",
";",
"}",
"}",
")",
";",
"list",
"<",
"object",
">",
"result",
"=",
"do",
"concurrent",
"get",
"(",
"cache",
",",
"\"",
"bar",
"\"",
",",
"count",
",",
"start",
"signal",
")",
";",
"assert",
"equals",
"(",
"count",
",",
"call",
"count",
"get",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"i",
"+",
"+",
")",
"{",
"/",
"/",
"do",
"concurrent",
"get",
"alternates",
"between",
"calling",
"get",
"unchecked",
"and",
"calling",
"get",
",",
"but",
"an",
"unchecked",
"/",
"/",
"exception",
"thrown",
"by",
"the",
"loader",
"is",
"always",
"wrapped",
"as",
"an",
"unchecked",
"execution",
"exception",
"assert",
"true",
"(",
"result",
"get",
"(",
"i",
")",
"instanceof",
"unchecked",
"execution",
"exception",
")",
";",
"assert",
"same",
"(",
"e",
",",
"(",
"(",
"unchecked",
"execution",
"exception",
")",
"result",
"get",
"(",
"i",
")",
")",
"get",
"cause",
"(",
")",
")",
";",
"}",
"/",
"/",
"subsequent",
"calls",
"should",
"call",
"the",
"loader",
"again",
",",
"not",
"get",
"the",
"old",
"exception",
"try",
"{",
"cache",
"get",
"unchecked",
"(",
"\"",
"bar",
"\"",
")",
";",
"fail",
"(",
")",
";",
"}",
"catch",
"(",
"unchecked",
"execution",
"exception",
"expected",
")",
"{",
"}",
"assert",
"equals",
"(",
"count",
"+",
"1",
",",
"call",
"count",
"get",
"(",
")",
")",
";",
"}"
] |
[
"gets",
"the",
"backend",
"distribution",
"for",
"r",
"p",
"cs",
"sent",
"by",
"a",
"test",
"client"
] | [
"public",
"io",
"grpc",
"testing",
"integration",
"messages",
"load",
"balancer",
"stats",
"response",
"get",
"client",
"stats",
"(",
"io",
"grpc",
"testing",
"integration",
"messages",
"load",
"balancer",
"stats",
"request",
"request",
")",
"{",
"return",
"io",
"grpc",
"stub",
"client",
"calls",
"blocking",
"unary",
"call",
"(",
"get",
"channel",
"(",
")",
",",
"get",
"get",
"client",
"stats",
"method",
"(",
")",
",",
"get",
"call",
"options",
"(",
")",
",",
"request",
")",
";",
"}"
] |
[
"parse",
"the",
"expected",
"and",
"actual",
"strings",
"as",
"json",
"and",
"assert",
"the",
"two",
"are",
"\"",
"not",
"similar",
"\"",
"-",
"i",
"e",
"they",
"contain",
"different",
"attribute",
"-",
"value",
"pairs",
"regardless",
"of",
"formatting",
"with",
"a",
"lenient",
"checking",
"(",
"extensible",
",",
"and",
"non",
"-",
"strict",
"array",
"ordering",
")"
] | [
"public",
"void",
"assert",
"json",
"not",
"equal",
"(",
"string",
"expected",
",",
"string",
"actual",
")",
"throws",
"exception",
"{",
"assert",
"json",
"not",
"equal",
"(",
"expected",
",",
"actual",
",",
"false",
")",
";",
"}"
] |
[
"sets",
"the",
"slots",
"to",
"use",
"for",
"companion",
"ads",
",",
"if",
"they",
"are",
"present",
"in",
"the",
"loaded",
"ad"
] | [
"public",
"builder",
"set",
"companion",
"ad",
"slots",
"(",
"collection",
"<",
"companion",
"ad",
"slot",
">",
"companion",
"ad",
"slots",
")",
"{",
"this",
"companion",
"ad",
"slots",
"=",
"immutable",
"list",
"copy",
"of",
"(",
"check",
"not",
"null",
"(",
"companion",
"ad",
"slots",
")",
")",
";",
"return",
"this",
";",
"}"
] |
[
"returns",
"the",
"label",
"of",
"this",
"package",
"'",
"s",
"build",
"file",
"typically",
"<",
"code",
">",
"get",
"build",
"file",
"label",
"(",
")",
"get",
"name",
"(",
")",
"equals",
"(",
"\"",
"build",
"\"",
")",
"<",
"code",
">",
"-",
"-",
"though",
"not",
"necessarily",
":",
"data",
"in",
"a",
"subdirectory",
"of",
"a",
"test",
"package",
"may",
"use",
"a",
"different",
"filename",
"to",
"avoid",
"inadvertently",
"creating",
"a",
"new",
"package"
] | [
"public",
"label",
"get",
"build",
"file",
"label",
"(",
")",
"{",
"return",
"build",
"file",
"get",
"label",
"(",
")",
";",
"}"
] |
[
"change",
"custom",
"storage",
"enablement"
] | [
"public",
"void",
"set",
"use",
"customize",
"storage",
"(",
"boolean",
"b",
")",
"{",
"if",
"(",
"b",
"=",
"=",
"allow",
"custom",
"storage",
")",
"{",
"return",
";",
"}",
"allow",
"custom",
"storage",
"=",
"b",
";",
"if",
"(",
"!",
"allow",
"custom",
"storage",
")",
"{",
"remove",
"explicit",
"this",
"parameter",
"(",
")",
";",
"if",
"(",
"remove",
"explicit",
"return",
"storage",
"ptr",
"parameter",
"(",
")",
")",
"{",
"revert",
"indirect",
"parameter",
"(",
"return",
"info",
")",
";",
"}",
"update",
"parameter",
"and",
"return",
"storage",
"(",
")",
";",
"}",
"else",
"{",
"switch",
"to",
"custom",
"storage",
"(",
")",
";",
"}",
"notify",
"data",
"changed",
"(",
")",
";",
"}"
] |
[
"test",
"when",
"md",
"5",
"file",
"does",
"not",
"exist",
"at",
"all"
] | [
"public",
"void",
"test",
"verify",
"m",
"d",
"5",
"file",
"missing",
"(",
")",
"throws",
"exception",
"{",
"m",
"d",
"5",
"file",
"utils",
"verify",
"saved",
"m",
"d",
"5",
"(",
"test",
"file",
",",
"test",
"md5",
")",
";",
"}"
] |
[
"save",
"the",
"given",
"flash",
"map",
",",
"in",
"some",
"underlying",
"storage",
"and",
"set",
"the",
"start",
"of",
"its",
"expiration",
"period",
"note",
":",
"invoke",
"this",
"method",
"prior",
"to",
"a",
"redirect",
"in",
"order",
"to",
"allow",
"saving",
"the",
"flash",
"map",
"in",
"the",
"http",
"session",
"or",
"in",
"a",
"response",
"cookie",
"before",
"the",
"response",
"is",
"committed"
] | [
"void",
"save",
"output",
"flash",
"map",
"(",
"flash",
"map",
"flash",
"map",
",",
"http",
"servlet",
"request",
"request",
",",
"http",
"servlet",
"response",
"response",
")",
";"
] |
[
"get",
"the",
"value",
"of",
"the",
"<",
"code",
">",
"name",
"<",
"code",
">",
"property",
"as",
"a",
"trimmed",
"<",
"code",
">",
"string",
"<",
"code",
">",
",",
"<",
"code",
">",
"default",
"value",
"<",
"code",
">",
"if",
"no",
"such",
"property",
"exists",
"see",
"@",
"{",
"configuration",
"#",
"get",
"trimmed",
"}",
"for",
"more",
"details"
] | [
"public",
"string",
"get",
"trimmed",
"(",
"string",
"name",
",",
"string",
"default",
"value",
")",
"{",
"string",
"ret",
"=",
"get",
"trimmed",
"(",
"name",
")",
";",
"return",
"ret",
"=",
"=",
"null",
"?",
"default",
"value",
":",
"ret",
";",
"}"
] |
[
"if",
"tasks",
"file",
"is",
"empty",
",",
"delete",
"the",
"cgroup"
] | [
"boolean",
"check",
"and",
"delete",
"cgroup",
"(",
"file",
"cgf",
")",
"throws",
"interrupted",
"exception",
"{",
"boolean",
"deleted",
"=",
"false",
";",
"/",
"/",
"file",
"input",
"stream",
"in",
"=",
"null",
";",
"try",
"(",
"file",
"input",
"stream",
"in",
"=",
"new",
"file",
"input",
"stream",
"(",
"cgf",
"+",
"\"",
"/",
"tasks",
"\"",
")",
")",
"{",
"if",
"(",
"in",
"read",
"(",
")",
"=",
"=",
"-",
"1",
")",
"{",
"/",
"*",
"*",
"\"",
"tasks",
"\"",
"file",
"is",
"empty",
",",
"sleep",
"a",
"bit",
"more",
"and",
"then",
"try",
"to",
"delete",
"the",
"*",
"cgroup",
"some",
"versions",
"of",
"linux",
"will",
"occasionally",
"panic",
"due",
"to",
"a",
"race",
"*",
"condition",
"in",
"this",
"area",
",",
"hence",
"the",
"paranoia",
"*",
"/",
"thread",
"sleep",
"(",
"delete",
"cgroup",
"delay",
")",
";",
"deleted",
"=",
"cgf",
"delete",
"(",
")",
";",
"if",
"(",
"!",
"deleted",
")",
"{",
"log",
"warn",
"(",
"\"",
"failed",
"attempt",
"to",
"delete",
"cgroup",
":",
"\"",
"+",
"cgf",
")",
";",
"}",
"}",
"else",
"{",
"log",
"line",
"from",
"tasks",
"file",
"(",
"cgf",
")",
";",
"}",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"log",
"warn",
"(",
"\"",
"failed",
"to",
"read",
"cgroup",
"tasks",
"file",
"\"",
",",
"e",
")",
";",
"}",
"return",
"deleted",
";",
"}"
] |
[
"actually",
"check",
"the",
"value",
"of",
"the",
"resource",
"that",
"is",
"bound",
"for",
"the",
"given",
"key"
] | [
"private",
"object",
"do",
"get",
"resource",
"(",
"object",
"actual",
"key",
")",
"{",
"return",
"this",
"transaction",
"context",
"get",
"resources",
"(",
")",
"get",
"(",
"actual",
"key",
")",
";",
"}"
] |
[
"guaranteed",
"to",
"throw",
"an",
"exception",
"and",
"leave",
"the",
"{",
"@",
"code",
"range",
"map",
"}",
"unmodified"
] | [
"public",
"void",
"put",
"coalescing",
"(",
"range",
"<",
"k",
">",
"range",
",",
"v",
"value",
")",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
")",
";",
"}"
] |
[
"this",
"is",
"a",
"wrapper",
"around",
"{",
"@",
"link",
"writable",
"byte",
"channel",
"#",
"write",
"(",
"byte",
"buffer",
")",
"}",
"if",
"the",
"amount",
"of",
"data",
"is",
"large",
",",
"it",
"writes",
"to",
"channel",
"in",
"smaller",
"chunks",
"this",
"is",
"to",
"avoid",
"jdk",
"from",
"creating",
"many",
"direct",
"buffers",
"as",
"the",
"size",
"of",
"buffer",
"increases",
"this",
"also",
"minimizes",
"extra",
"copies",
"in",
"nio",
"layer",
"as",
"a",
"result",
"of",
"multiple",
"write",
"operations",
"required",
"to",
"write",
"a",
"large",
"buffer"
] | [
"private",
"int",
"channel",
"write",
"(",
"writable",
"byte",
"channel",
"channel",
",",
"byte",
"buffer",
"buffer",
")",
"throws",
"i",
"o",
"exception",
"{",
"int",
"count",
"=",
"(",
"buffer",
"remaining",
"(",
")",
"<",
"=",
"nio",
"buffer",
"limit",
")",
"?",
"channel",
"write",
"(",
"buffer",
")",
":",
"channel",
"i",
"o",
"(",
"null",
",",
"channel",
",",
"buffer",
")",
";",
"if",
"(",
"count",
">",
"0",
")",
"{",
"rpc",
"metrics",
"incr",
"sent",
"bytes",
"(",
"count",
")",
";",
"}",
"return",
"count",
";",
"}"
] |
[
"translates",
"the",
"given",
"program",
"to",
"an",
"optimized",
"plan",
",",
"where",
"all",
"nodes",
"have",
"their",
"local",
"strategy",
"assigned",
"and",
"all",
"channels",
"have",
"a",
"shipping",
"strategy",
"assigned",
"for",
"more",
"details",
"on",
"the",
"optimization",
"phase",
",",
"see",
"the",
"comments",
"for",
"{",
"@",
"link",
"#",
"compile",
"(",
"org",
"apache",
"flink",
"api",
"common",
"plan",
",",
"org",
"apache",
"flink",
"optimizer",
"postpass",
"optimizer",
"post",
"pass",
")",
"}"
] | [
"public",
"optimized",
"plan",
"compile",
"(",
"plan",
"program",
")",
"throws",
"compiler",
"exception",
"{",
"final",
"optimizer",
"post",
"pass",
"post",
"passer",
"=",
"get",
"post",
"pass",
"from",
"plan",
"(",
"program",
")",
";",
"return",
"compile",
"(",
"program",
",",
"post",
"passer",
")",
";",
"}"
] |
[
"counts",
"the",
"bytes",
"in",
"the",
"given",
"input",
"stream",
"using",
"skip",
"if",
"possible"
] | [
"private",
"long",
"count",
"by",
"skipping",
"(",
"input",
"stream",
"in",
")",
"throws",
"i",
"o",
"exception",
"{",
"long",
"count",
"=",
"0",
";",
"long",
"skipped",
";",
"while",
"(",
"(",
"skipped",
"=",
"skip",
"up",
"to",
"(",
"in",
",",
"integer",
"max",
"value",
")",
")",
">",
"0",
")",
"{",
"count",
"+",
"=",
"skipped",
";",
"}",
"return",
"count",
";",
"}"
] |
[
"add",
"the",
"name",
"server",
"info",
"to",
"the",
"authority",
"section"
] | [
"private",
"void",
"add",
"n",
"s",
"(",
"message",
"response",
",",
"zone",
"zone",
",",
"int",
"flags",
")",
"{",
"r",
"rset",
"ns",
"records",
"=",
"zone",
"get",
"n",
"s",
"(",
")",
";",
"add",
"r",
"rset",
"(",
"ns",
"records",
"get",
"name",
"(",
")",
",",
"response",
",",
"ns",
"records",
",",
"section",
"authority",
",",
"flags",
")",
";",
"}"
] |
[
"get",
"storeinventory",
":",
"returns",
"pet",
"inventories",
"by",
"status",
"returns",
"a",
"map",
"of",
"status",
"codes",
"to",
"quantities"
] | [
"default",
"response",
"entity",
"<",
"map",
"<",
"string",
",",
"integer",
">",
">",
"get",
"inventory",
"(",
")",
"{",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"http",
"status",
"not",
"implemented",
")",
";",
"}"
] |
[
"rename",
"a",
"snapshot"
] | [
"public",
"void",
"rename",
"snapshot",
"(",
"final",
"path",
"path",
",",
"final",
"string",
"snapshot",
"old",
"name",
",",
"final",
"string",
"snapshot",
"new",
"name",
")",
"throws",
"i",
"o",
"exception",
"{",
"final",
"path",
"abs",
"f",
"=",
"fix",
"relative",
"part",
"(",
"path",
")",
";",
"new",
"f",
"s",
"link",
"resolver",
"<",
"void",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"next",
"(",
"final",
"abstract",
"file",
"system",
"fs",
",",
"final",
"path",
"p",
")",
"throws",
"i",
"o",
"exception",
"{",
"fs",
"rename",
"snapshot",
"(",
"p",
",",
"snapshot",
"old",
"name",
",",
"snapshot",
"new",
"name",
")",
";",
"return",
"null",
";",
"}",
"}",
"resolve",
"(",
"this",
",",
"abs",
"f",
")",
";",
"}"
] |
[
"get",
"zoo",
"keeper",
"parent",
"path"
] | [
"public",
"string",
"get",
"z",
"k",
"parent",
"path",
"(",
")",
"{",
"return",
"configs",
"map",
"get",
"(",
"zk",
"parent",
"path",
")",
";",
"}"
] |
[
"get",
"the",
"list",
"of",
"addresses",
"of",
"the",
"functions"
] | [
"public",
"list",
"<",
"long",
">",
"get",
"starting",
"addresses",
"(",
")",
"{",
"return",
"starting",
"addresses",
";",
"}"
] |
[
"return",
"the",
"vendor",
"-",
"specific",
"entity",
"manager",
"interface",
"that",
"this",
"provider",
"'",
"s",
"entity",
"managers",
"will",
"implement",
"if",
"the",
"provider",
"does",
"not",
"offer",
"any",
"entity",
"manager",
"extensions",
",",
"the",
"adapter",
"should",
"simply",
"return",
"the",
"standard",
"{",
"@",
"link",
"javax",
"persistence",
"entity",
"manager",
"}",
"class",
"here"
] | [
"default",
"class",
"<",
"?",
"extends",
"entity",
"manager",
">",
"get",
"entity",
"manager",
"interface",
"(",
")",
"{",
"return",
"entity",
"manager",
"class",
";",
"}"
] |
[
"execute",
"{",
"@",
"link",
"file",
"system",
"#",
"list",
"status",
"(",
"path",
",",
"path",
"filter",
")",
"}",
",",
"verify",
"the",
"length",
"of",
"the",
"result",
",",
"then",
"return",
"the",
"listing"
] | [
"private",
"file",
"status",
"[",
"]",
"verify",
"list",
"status",
"(",
"int",
"expected",
",",
"path",
"path",
",",
"path",
"filter",
"filter",
")",
"throws",
"i",
"o",
"exception",
"{",
"file",
"status",
"[",
"]",
"result",
"=",
"get",
"file",
"system",
"(",
")",
"list",
"status",
"(",
"path",
",",
"filter",
")",
";",
"assert",
"equals",
"(",
"\"",
"length",
"of",
"list",
"status",
"(",
"\"",
"+",
"path",
"+",
"\"",
",",
"\"",
"+",
"filter",
"+",
"\"",
")",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"result",
")",
",",
"expected",
",",
"result",
"length",
")",
";",
"return",
"result",
";",
"}"
] |
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
] | [
"private",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
] |
[
"adds",
"{",
"@",
"code",
"delta",
"}",
"to",
"the",
"value",
"currently",
"associated",
"with",
"{",
"@",
"code",
"key",
"}",
",",
"and",
"returns",
"the",
"old",
"value"
] | [
"public",
"long",
"get",
"and",
"add",
"(",
"k",
"key",
",",
"long",
"delta",
")",
"{",
"return",
"get",
"and",
"accumulate",
"(",
"key",
",",
"delta",
",",
"long",
":",
":",
"sum",
")",
";",
"}"
] |
[
"overridden",
"equals",
"to",
"support",
"collections"
] | [
"public",
"boolean",
"equals",
"(",
"object",
"obj",
")",
"{",
"if",
"(",
"this",
"=",
"=",
"obj",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"obj",
"=",
"=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"get",
"class",
"(",
")",
"!",
"=",
"obj",
"get",
"class",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"function",
"record",
"other",
"=",
"(",
"function",
"record",
")",
"obj",
";",
"if",
"(",
"get",
"i",
"d",
"(",
")",
"!",
"=",
"other",
"get",
"i",
"d",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}"
] |
[
"peeks",
"into",
"the",
"cache",
"'",
"s",
"internals",
"to",
"check",
"its",
"internal",
"consistency",
"verifies",
"that",
"each",
"segment",
"'",
"s",
"count",
"matches",
"its",
"#",
"elements",
"(",
"after",
"cleanup",
")",
",",
"each",
"segment",
"is",
"unlocked",
",",
"each",
"entry",
"contains",
"a",
"non",
"-",
"null",
"key",
"and",
"value",
",",
"and",
"the",
"eviction",
"and",
"expiration",
"queues",
"are",
"consistent",
"(",
"see",
"{",
"@",
"link",
"#",
"check",
"eviction",
"}",
",",
"{",
"@",
"link",
"#",
"check",
"expiration",
"}",
")"
] | [
"static",
"void",
"check",
"valid",
"state",
"(",
"cache",
"<",
"?",
",",
"?",
">",
"cache",
")",
"{",
"if",
"(",
"has",
"local",
"cache",
"(",
"cache",
")",
")",
"{",
"check",
"valid",
"state",
"(",
"to",
"local",
"cache",
"(",
"cache",
")",
")",
";",
"}",
"}"
] |
[
"checks",
"whether",
"seeking",
"backward",
"can",
"be",
"performed"
] | [
"public",
"boolean",
"can",
"seek",
"backward",
"(",
")",
"{",
"return",
"get",
"number",
"of",
"frames",
"(",
")",
">",
"1",
";",
"}"
] |
[
"computes",
"the",
"quantile",
"values",
"of",
"the",
"given",
"dataset"
] | [
"public",
"map",
"<",
"integer",
",",
"double",
">",
"compute",
"(",
"long",
"dataset",
")",
"{",
"return",
"compute",
"in",
"place",
"(",
"longs",
"to",
"doubles",
"(",
"dataset",
")",
")",
";",
"}"
] |
[
"checks",
"if",
"the",
"given",
"string",
"is",
"not",
"empty"
] | [
"public",
"static",
"boolean",
"is",
"not",
"empty",
"(",
"string",
"str",
")",
"{",
"return",
"!",
"is",
"empty",
"(",
"str",
")",
";",
"}"
] |
[
"get",
"the",
"vertices",
"in",
"local",
"coordinates"
] | [
"public",
"vec",
"2",
"[",
"]",
"get",
"vertices",
"(",
")",
"{",
"return",
"m",
"vertices",
";",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.