docstring_tokens
list | code_tokens
list |
---|---|
[
"return",
"the",
"path",
"of",
"storageemulated",
"0"
]
| [
"public",
"static",
"string",
"get",
"external",
"storage",
"path",
"(",
")",
"{",
"if",
"(",
"!",
"utils",
"bridge",
"is",
"s",
"d",
"card",
"enable",
"by",
"environment",
"(",
")",
")",
"return",
"\"",
"\"",
";",
"return",
"get",
"absolute",
"path",
"(",
"environment",
"get",
"external",
"storage",
"directory",
"(",
")",
")",
";",
"}"
]
|
[
"indicates",
"if",
"deferrable",
"validations",
"should",
"be",
"skipped",
"until",
"the",
"transform",
"starts"
]
| [
"public",
"void",
"set",
"defer",
"validation",
"(",
"boolean",
"defer",
"validation",
")",
"{",
"this",
"defer",
"validation",
"=",
"defer",
"validation",
";",
"}"
]
|
[
"reset",
"the",
"stacktrace",
"of",
"this",
"runnable",
"to",
"this",
"point",
"to",
"be",
"called",
"right",
"before",
"the",
"runnable",
"is",
"scheduled",
"to",
"another",
"thread",
",",
"in",
"case",
"it",
"was",
"instantiated",
"ahead",
"of",
"time",
"with",
"a",
"different",
"code",
"flow"
]
| [
"public",
"void",
"reset",
"trace",
"(",
")",
"{",
"if",
"(",
"m",
"tracing",
"throwable",
"!",
"=",
"null",
")",
"{",
"m",
"tracing",
"throwable",
"fill",
"in",
"stack",
"trace",
"(",
")",
";",
"}",
"}"
]
|
[
"returns",
"the",
"given",
"unsigned",
"specific",
"integer",
"value",
",",
"shifted",
"right",
"by",
"this",
"integer",
"value"
]
| [
"public",
"integer",
"value",
"unsigned",
"shift",
"right",
"of",
"(",
"specific",
"integer",
"value",
"other",
")",
"{",
"return",
"unsigned",
"shift",
"right",
"of",
"(",
"(",
"integer",
"value",
")",
"other",
")",
";",
"}"
]
|
[
"make",
"sure",
"that",
"bursts",
"can",
"never",
"go",
"above",
"1",
"-",
"second",
"-",
"worth",
"-",
"of",
"-",
"work",
"for",
"the",
"current",
"rate",
",",
"even",
"when",
"we",
"change",
"the",
"rate"
]
| [
"public",
"void",
"test",
"we",
"never",
"get",
"a",
"burst",
"more",
"than",
"one",
"sec",
"(",
")",
"{",
"rate",
"limiter",
"limiter",
"=",
"rate",
"limiter",
"create",
"(",
"1",
"0",
",",
"stopwatch",
")",
";",
"int",
"[",
"]",
"rates",
"=",
"{",
"1000",
",",
"1",
",",
"10",
",",
"1000000",
",",
"10",
",",
"1",
"}",
";",
"for",
"(",
"int",
"rate",
":",
"rates",
")",
"{",
"int",
"one",
"sec",
"worth",
"of",
"work",
"=",
"rate",
";",
"stopwatch",
"sleep",
"millis",
"(",
"rate",
"*",
"1000",
")",
";",
"limiter",
"set",
"rate",
"(",
"rate",
")",
";",
"long",
"burst",
"=",
"measure",
"total",
"time",
"millis",
"(",
"limiter",
",",
"one",
"sec",
"worth",
"of",
"work",
",",
"new",
"random",
"(",
")",
")",
";",
"/",
"/",
"we",
"allow",
"one",
"second",
"worth",
"of",
"work",
"to",
"go",
"in",
"a",
"burst",
"(",
"i",
"e",
"take",
"less",
"than",
"a",
"second",
")",
"assert",
"true",
"(",
"burst",
"<",
"=",
"1000",
")",
";",
"long",
"after",
"burst",
"=",
"measure",
"total",
"time",
"millis",
"(",
"limiter",
",",
"one",
"sec",
"worth",
"of",
"work",
",",
"new",
"random",
"(",
")",
")",
";",
"/",
"/",
"but",
"work",
"beyond",
"that",
"must",
"take",
"at",
"least",
"one",
"second",
"assert",
"true",
"(",
"after",
"burst",
">",
"=",
"1000",
")",
";",
"}",
"}"
]
|
[
"returns",
"whether",
"the",
"python",
"function",
"takes",
"row",
"as",
"input",
"instead",
"of",
"each",
"columns",
"of",
"a",
"row"
]
| [
"default",
"boolean",
"takes",
"row",
"as",
"input",
"(",
")",
"{",
"return",
"false",
";",
"}"
]
|
[
"set",
"a",
"factory",
"for",
"a",
"schema",
",",
"verify",
"it",
"works"
]
| [
"public",
"void",
"test",
"committer",
"factory",
"for",
"schema",
"(",
")",
"throws",
"throwable",
"{",
"create",
"committer",
"factory",
"(",
"simple",
"committer",
"factory",
"class",
",",
"http",
"path",
",",
"new",
"bonded",
"configuration",
"(",
")",
")",
";",
"}"
]
|
[
"check",
"for",
"a",
"cached",
"exception",
"if",
"the",
"exception",
"is",
"found",
",",
"throw",
"it",
"directly"
]
| [
"protected",
"void",
"check",
"for",
"cached",
"exception",
"(",
"@",
"nullable",
"cache",
"exception",
"cache",
",",
"object",
"cache",
"key",
")",
"{",
"if",
"(",
"exception",
"cache",
"=",
"=",
"null",
")",
"{",
"return",
";",
"}",
"cache",
"value",
"wrapper",
"result",
"=",
"do",
"get",
"(",
"exception",
"cache",
",",
"cache",
"key",
")",
";",
"if",
"(",
"result",
"!",
"=",
"null",
")",
"{",
"throwable",
"ex",
"=",
"(",
"throwable",
")",
"result",
"get",
"(",
")",
";",
"assert",
"state",
"(",
"ex",
"!",
"=",
"null",
",",
"\"",
"no",
"exception",
"in",
"cache",
"\"",
")",
";",
"throw",
"rewrite",
"call",
"stack",
"(",
"ex",
",",
"get",
"class",
"(",
")",
"get",
"name",
"(",
")",
",",
"\"",
"invoke",
"\"",
")",
";",
"}",
"}"
]
|
[
"assets",
"that",
"the",
"action",
"used",
"to",
"generate",
"the",
"given",
"outputs",
"has",
"the",
"expected",
"inputs",
"and",
"outputs"
]
| [
"void",
"assert",
"action",
"artifacts",
"(",
"rule",
"context",
"rule",
"context",
",",
"immutable",
"list",
"<",
"artifact",
">",
"inputs",
",",
"immutable",
"list",
"<",
"artifact",
">",
"outputs",
")",
"{",
"/",
"/",
"actions",
"must",
"have",
"at",
"least",
"one",
"output",
"assert",
"that",
"(",
"outputs",
")",
"is",
"not",
"empty",
"(",
")",
";",
"/",
"/",
"get",
"the",
"action",
"from",
"one",
"of",
"the",
"outputs",
"action",
"analysis",
"metadata",
"action",
"=",
"rule",
"context",
"get",
"analysis",
"environment",
"(",
")",
"get",
"local",
"generating",
"action",
"(",
"outputs",
"get",
"(",
"0",
")",
")",
";",
"assert",
"that",
"(",
"action",
")",
"is",
"not",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"remove",
"tooling",
"artifacts",
"(",
"action",
"get",
"inputs",
"(",
")",
")",
")",
"contains",
"exactly",
"elements",
"in",
"(",
"inputs",
")",
";",
"assert",
"that",
"(",
"action",
"get",
"outputs",
"(",
")",
")",
"contains",
"exactly",
"elements",
"in",
"(",
"outputs",
")",
";",
"}"
]
|
[
"returns",
"the",
"segments",
"info",
"for",
"the",
"given",
"commit",
"or",
"for",
"the",
"latest",
"commit",
"if",
"the",
"given",
"commit",
"is",
"<",
"code",
">",
"null",
"<",
"code",
">"
]
| [
"private",
"static",
"segment",
"infos",
"read",
"segments",
"info",
"(",
"index",
"commit",
"commit",
",",
"directory",
"directory",
")",
"throws",
"i",
"o",
"exception",
"{",
"assert",
"commit",
"=",
"=",
"null",
"|",
"|",
"commit",
"get",
"directory",
"(",
")",
"=",
"=",
"directory",
";",
"try",
"{",
"return",
"commit",
"=",
"=",
"null",
"?",
"lucene",
"read",
"segment",
"infos",
"(",
"directory",
")",
":",
"lucene",
"read",
"segment",
"infos",
"(",
"commit",
")",
";",
"}",
"catch",
"(",
"e",
"o",
"f",
"exception",
"eof",
")",
"{",
"/",
"/",
"todo",
"this",
"should",
"be",
"caught",
"by",
"lucene",
"-",
"eof",
"is",
"almost",
"certainly",
"an",
"index",
"corruption",
"throw",
"new",
"corrupt",
"index",
"exception",
"(",
"\"",
"read",
"past",
"eof",
"while",
"reading",
"segment",
"infos",
"\"",
",",
"\"",
"commit",
"(",
"\"",
"+",
"commit",
"+",
"\"",
")",
"\"",
",",
"eof",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"exception",
")",
"{",
"throw",
"exception",
";",
"/",
"/",
"i",
"o",
"exceptions",
"like",
"too",
"many",
"open",
"files",
"are",
"not",
"necessarily",
"a",
"corruption",
"-",
"just",
"bubble",
"it",
"up",
"}",
"catch",
"(",
"exception",
"ex",
")",
"{",
"throw",
"new",
"corrupt",
"index",
"exception",
"(",
"\"",
"hit",
"unexpected",
"exception",
"while",
"reading",
"segment",
"infos",
"\"",
",",
"\"",
"commit",
"(",
"\"",
"+",
"commit",
"+",
"\"",
")",
"\"",
",",
"ex",
")",
";",
"}",
"}"
]
|
[
"sums",
"all",
"the",
"individual",
"values",
"within",
"the",
"iterator",
"and",
"writes",
"them",
"to",
"the",
"same",
"key"
]
| [
"public",
"void",
"reduce",
"(",
"int",
"writable",
"key",
",",
"iterable",
"<",
"int",
"writable",
">",
"values",
",",
"context",
"context",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
"{",
"int",
"sum",
"=",
"0",
";",
"for",
"(",
"int",
"writable",
"value",
":",
"values",
")",
"{",
"sum",
"+",
"=",
"value",
"get",
"(",
")",
";",
"}",
"val",
"set",
"(",
"sum",
")",
";",
"context",
"write",
"(",
"key",
",",
"val",
")",
";",
"}"
]
|
[
"returns",
"the",
"current",
"epoch",
"of",
"the",
"leader"
]
| [
"public",
"long",
"get",
"epoch",
"(",
")",
"{",
"return",
"zxid",
"utils",
"get",
"epoch",
"from",
"zxid",
"(",
"last",
"proposed",
")",
";",
"}"
]
|
[
"check",
"the",
"correctness",
"of",
"snapshot",
"list",
"within",
"snapshottable",
"dir"
]
| [
"private",
"void",
"check",
"snapshot",
"list",
"(",
"i",
"node",
"directory",
"src",
"root",
",",
"string",
"[",
"]",
"sorted",
"names",
",",
"string",
"[",
"]",
"names",
")",
"{",
"assert",
"true",
"(",
"src",
"root",
"is",
"snapshottable",
"(",
")",
")",
";",
"read",
"only",
"list",
"<",
"snapshot",
">",
"list",
"by",
"name",
"=",
"src",
"root",
"get",
"directory",
"snapshottable",
"feature",
"(",
")",
"get",
"snapshot",
"list",
"(",
")",
";",
"assert",
"equals",
"(",
"sorted",
"names",
"length",
",",
"list",
"by",
"name",
"size",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
"by",
"name",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"assert",
"equals",
"(",
"sorted",
"names",
"[",
"i",
"]",
",",
"list",
"by",
"name",
"get",
"(",
"i",
")",
"get",
"root",
"(",
")",
"get",
"local",
"name",
"(",
")",
")",
";",
"}",
"diff",
"list",
"<",
"directory",
"diff",
">",
"list",
"by",
"time",
"=",
"src",
"root",
"get",
"diffs",
"(",
")",
"as",
"list",
"(",
")",
";",
"assert",
"equals",
"(",
"names",
"length",
",",
"list",
"by",
"time",
"size",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
"by",
"time",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"snapshot",
"s",
"=",
"src",
"root",
"get",
"directory",
"snapshottable",
"feature",
"(",
")",
"get",
"snapshot",
"by",
"id",
"(",
"list",
"by",
"time",
"get",
"(",
"i",
")",
"get",
"snapshot",
"id",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"names",
"[",
"i",
"]",
",",
"s",
"get",
"root",
"(",
")",
"get",
"local",
"name",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"set",
"the",
"expire",
"after",
"write",
"in",
"nanoseconds"
]
| [
"public",
"void",
"set",
"expire",
"after",
"access",
"(",
"optional",
"long",
"expire",
"after",
"access",
"nanos",
")",
"{",
"this",
"expire",
"after",
"access",
"nanos",
"=",
"expire",
"after",
"access",
"nanos",
"is",
"present",
"(",
")",
"?",
"expire",
"after",
"access",
"nanos",
"get",
"as",
"long",
"(",
")",
":",
"null",
";",
"}"
]
|
[
"returns",
"the",
"number",
"of",
"bytes",
"in",
"the",
"input",
"file"
]
| [
"public",
"long",
"get",
"file",
"size",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"raf",
"=",
"=",
"null",
"?",
"0",
":",
"raf",
"length",
"(",
")",
";",
"}"
]
|
[
"sets",
"the",
"maximum",
"scale",
"factor",
"for",
"the",
"x",
"-",
"axis"
]
| [
"public",
"void",
"set",
"maximum",
"scale",
"x",
"(",
"float",
"x",
"scale",
")",
"{",
"if",
"(",
"x",
"scale",
"=",
"=",
"0",
"f",
")",
"x",
"scale",
"=",
"float",
"max",
"value",
";",
"m",
"max",
"scale",
"x",
"=",
"x",
"scale",
";",
"limit",
"trans",
"and",
"scale",
"(",
"m",
"matrix",
"touch",
",",
"m",
"content",
"rect",
")",
";",
"}"
]
|
[
"get",
"prefix",
"ns",
"number"
]
| [
"public",
"big",
"decimal",
"get",
"prefix",
"ns",
"number",
"(",
")",
"{",
"return",
"prefix",
"ns",
"number",
";",
"}"
]
|
[
"get",
"a",
"copy",
"of",
"the",
"current",
"{",
"@",
"link",
"object",
"mapper",
"}"
]
| [
"public",
"object",
"mapper",
"get",
"object",
"mapper",
"(",
")",
"{",
"return",
"mapper",
"copy",
"(",
")",
";",
"}"
]
|
[
"convert",
"a",
"map",
"of",
"columns",
"to",
"values",
"into",
"the",
"tuple",
"domain",
"which",
"requires",
"those",
"columns",
"to",
"be",
"fixed",
"to",
"those",
"values",
"null",
"is",
"allowed",
"as",
"a",
"fixed",
"value"
]
| [
"public",
"static",
"<",
"t",
">",
"tuple",
"domain",
"<",
"t",
">",
"from",
"fixed",
"values",
"(",
"map",
"<",
"t",
",",
"nullable",
"value",
">",
"fixed",
"values",
")",
"{",
"return",
"tuple",
"domain",
"with",
"column",
"domains",
"(",
"fixed",
"values",
"entry",
"set",
"(",
")",
"stream",
"(",
")",
"collect",
"(",
"to",
"linked",
"map",
"(",
"map",
"entry",
":",
":",
"get",
"key",
",",
"entry",
"-",
">",
"{",
"type",
"type",
"=",
"entry",
"get",
"value",
"(",
")",
"get",
"type",
"(",
")",
";",
"object",
"value",
"=",
"entry",
"get",
"value",
"(",
")",
"get",
"value",
"(",
")",
";",
"return",
"value",
"=",
"=",
"null",
"?",
"domain",
"only",
"null",
"(",
"type",
")",
":",
"domain",
"single",
"value",
"(",
"type",
",",
"value",
")",
";",
"}",
")",
")",
")",
";",
"}"
]
|
[
"returns",
"a",
"rex",
"simplify",
"the",
"same",
"as",
"this",
"but",
"with",
"a",
"specified",
"{",
"@",
"link",
"#",
"default",
"unknown",
"as",
"}",
"value"
]
| [
"public",
"rex",
"simplify",
"with",
"unknown",
"as",
"false",
"(",
"boolean",
"unknown",
"as",
"false",
")",
"{",
"final",
"rex",
"unknown",
"as",
"default",
"unknown",
"as",
"=",
"rex",
"unknown",
"as",
"false",
"if",
"(",
"unknown",
"as",
"false",
")",
";",
"return",
"default",
"unknown",
"as",
"=",
"=",
"this",
"default",
"unknown",
"as",
"?",
"this",
":",
"new",
"rex",
"simplify",
"(",
"rex",
"builder",
",",
"predicates",
",",
"default",
"unknown",
"as",
",",
"predicate",
"elimination",
",",
"paranoid",
",",
"executor",
")",
";",
"}"
]
|
[
"obfuscates",
"the",
"given",
"class",
"member"
]
| [
"private",
"void",
"visit",
"member",
"(",
"clazz",
"clazz",
",",
"member",
"member",
",",
"boolean",
"is",
"field",
")",
"{",
"/",
"/",
"get",
"the",
"member",
"'",
"s",
"name",
"and",
"descriptor",
"string",
"name",
"=",
"member",
"get",
"name",
"(",
"clazz",
")",
";",
"string",
"descriptor",
"=",
"member",
"get",
"descriptor",
"(",
"clazz",
")",
";",
"/",
"/",
"check",
"whether",
"we",
"'",
"re",
"allowed",
"to",
"overload",
"aggressively",
"if",
"(",
"!",
"allow",
"aggressive",
"overloading",
")",
"{",
"/",
"/",
"trim",
"the",
"return",
"argument",
"from",
"the",
"descriptor",
"if",
"not",
"/",
"/",
"works",
"for",
"fields",
"and",
"methods",
"alike",
"descriptor",
"=",
"descriptor",
"substring",
"(",
"0",
",",
"descriptor",
"index",
"of",
"(",
"'",
")",
"'",
")",
"+",
"1",
")",
";",
"}",
"/",
"/",
"get",
"the",
"name",
"map",
"map",
"name",
"map",
"=",
"member",
"obfuscator",
"retrieve",
"name",
"map",
"(",
"descriptor",
"map",
",",
"descriptor",
")",
";",
"/",
"/",
"get",
"the",
"member",
"'",
"s",
"new",
"name",
"string",
"new",
"name",
"=",
"member",
"obfuscator",
"new",
"member",
"name",
"(",
"member",
")",
";",
"/",
"/",
"get",
"the",
"expected",
"old",
"name",
"for",
"this",
"new",
"name",
"string",
"previous",
"name",
"=",
"(",
"string",
")",
"name",
"map",
"get",
"(",
"new",
"name",
")",
";",
"if",
"(",
"previous",
"name",
"!",
"=",
"null",
"&",
"&",
"!",
"name",
"equals",
"(",
"previous",
"name",
")",
")",
"{",
"/",
"/",
"there",
"'",
"s",
"a",
"conflict",
"!",
"a",
"member",
"(",
"with",
"a",
"given",
"old",
"name",
")",
"in",
"a",
"/",
"/",
"first",
"namespace",
"has",
"received",
"the",
"same",
"new",
"name",
"as",
"this",
"/",
"/",
"member",
"(",
"with",
"a",
"different",
"old",
"name",
")",
"in",
"a",
"second",
"name",
"space",
",",
"/",
"/",
"and",
"now",
"these",
"two",
"have",
"to",
"live",
"together",
"in",
"this",
"name",
"space",
"if",
"(",
"member",
"obfuscator",
"has",
"fixed",
"new",
"member",
"name",
"(",
"member",
")",
"&",
"&",
"warning",
"printer",
"!",
"=",
"null",
")",
"{",
"descriptor",
"=",
"member",
"get",
"descriptor",
"(",
"clazz",
")",
";",
"warning",
"printer",
"print",
"(",
"clazz",
"get",
"name",
"(",
")",
",",
"\"",
"warning",
":",
"\"",
"+",
"class",
"util",
"external",
"class",
"name",
"(",
"clazz",
"get",
"name",
"(",
")",
")",
"+",
"(",
"is",
"field",
"?",
"\"",
":",
"field",
"'",
"\"",
"+",
"class",
"util",
"external",
"full",
"field",
"description",
"(",
"0",
",",
"name",
",",
"descriptor",
")",
":",
"\"",
":",
"method",
"'",
"\"",
"+",
"class",
"util",
"external",
"full",
"method",
"description",
"(",
"clazz",
"get",
"name",
"(",
")",
",",
"0",
",",
"name",
",",
"descriptor",
")",
")",
"+",
"\"",
"'",
"can",
"'",
"t",
"be",
"mapped",
"to",
"'",
"\"",
"+",
"new",
"name",
"+",
"\"",
"'",
"because",
"it",
"would",
"conflict",
"with",
"\"",
"+",
"(",
"is",
"field",
"?",
"\"",
"field",
"'",
"\"",
":",
"\"",
"method",
"'",
"\"",
")",
"+",
"previous",
"name",
"+",
"\"",
"'",
",",
"which",
"is",
"already",
"being",
"mapped",
"to",
"'",
"\"",
"+",
"new",
"name",
"+",
"\"",
"'",
"\"",
")",
";",
"}",
"/",
"/",
"clear",
"the",
"conflicting",
"name",
"member",
"obfuscator",
"set",
"new",
"member",
"name",
"(",
"member",
",",
"null",
")",
";",
"/",
"/",
"assign",
"a",
"new",
"name",
"member",
"accept",
"(",
"clazz",
",",
"member",
"obfuscator",
")",
";",
"}",
"}"
]
|
[
"constructs",
"yarn",
"options",
"the",
"python",
"shell",
"option",
"will",
"add",
"prefix",
"'",
"y",
"'",
"to",
"align",
"yarn",
"options",
"in",
"`",
"flink",
"run",
"`"
]
| [
"private",
"static",
"void",
"construct",
"yarn",
"option",
"(",
"list",
"<",
"string",
">",
"options",
",",
"option",
"yarn",
"option",
",",
"command",
"line",
"command",
"line",
")",
"{",
"if",
"(",
"command",
"line",
"has",
"option",
"(",
"yarn",
"option",
"get",
"opt",
"(",
")",
")",
")",
"{",
"options",
"add",
"(",
"\"",
"-",
"y",
"\"",
"+",
"yarn",
"option",
"get",
"opt",
"(",
")",
")",
";",
"options",
"add",
"(",
"command",
"line",
"get",
"option",
"value",
"(",
"yarn",
"option",
"get",
"opt",
"(",
")",
")",
")",
";",
"}",
"}"
]
|
[
"check",
"if",
"identity",
"is",
"allowed",
"to",
"revoke",
"the",
"specified",
"privilege",
"on",
"the",
"specified",
"table",
"from",
"the",
"revokee"
]
| [
"default",
"void",
"check",
"can",
"revoke",
"table",
"privilege",
"(",
"identity",
"identity",
",",
"access",
"control",
"context",
"context",
",",
"privilege",
"privilege",
",",
"catalog",
"schema",
"table",
"name",
"table",
",",
"presto",
"principal",
"revokee",
",",
"boolean",
"grant",
"option",
"for",
")",
"{",
"deny",
"revoke",
"table",
"privilege",
"(",
"privilege",
"to",
"string",
"(",
")",
",",
"table",
"to",
"string",
"(",
")",
")",
";",
"}"
]
|
[
"gets",
"the",
"last",
"instruction",
"of",
"this",
"block",
"this",
"is",
"just",
"a",
"convenient",
"shorthand",
"for",
"{",
"@",
"code",
"get",
"insns",
"(",
")",
"get",
"last",
"(",
")",
"}"
]
| [
"public",
"insn",
"get",
"last",
"insn",
"(",
")",
"{",
"return",
"insns",
"get",
"last",
"(",
")",
";",
"}"
]
|
[
"visits",
"a",
"function",
"and",
"defines",
"variables",
"for",
"each",
"parameter",
"checks",
":",
"control",
"flow",
",",
"type",
"validation"
]
| [
"public",
"void",
"visit",
"function",
"(",
"s",
"function",
"user",
"function",
"node",
",",
"script",
"scope",
"script",
"scope",
")",
"{",
"string",
"function",
"name",
"=",
"user",
"function",
"node",
"get",
"function",
"name",
"(",
")",
";",
"local",
"function",
"local",
"function",
"=",
"script",
"scope",
"get",
"function",
"table",
"(",
")",
"get",
"function",
"(",
"function",
"name",
",",
"user",
"function",
"node",
"get",
"canonical",
"type",
"name",
"parameters",
"(",
")",
"size",
"(",
")",
")",
";",
"class",
"<",
"?",
">",
"return",
"type",
"=",
"local",
"function",
"get",
"return",
"type",
"(",
")",
";",
"list",
"<",
"class",
"<",
"?",
">",
">",
"type",
"parameters",
"=",
"local",
"function",
"get",
"type",
"parameters",
"(",
")",
";",
"function",
"scope",
"function",
"scope",
"=",
"new",
"function",
"scope",
"(",
"script",
"scope",
",",
"local",
"function",
"get",
"return",
"type",
"(",
")",
")",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"local",
"function",
"get",
"type",
"parameters",
"(",
")",
"size",
"(",
")",
";",
"+",
"+",
"index",
")",
"{",
"class",
"<",
"?",
">",
"type",
"parameter",
"=",
"local",
"function",
"get",
"type",
"parameters",
"(",
")",
"get",
"(",
"index",
")",
";",
"string",
"parameter",
"name",
"=",
"user",
"function",
"node",
"get",
"parameter",
"names",
"(",
")",
"get",
"(",
"index",
")",
";",
"function",
"scope",
"define",
"variable",
"(",
"user",
"function",
"node",
"get",
"location",
"(",
")",
",",
"type",
"parameter",
",",
"parameter",
"name",
",",
"false",
")",
";",
"}",
"s",
"block",
"user",
"block",
"node",
"=",
"user",
"function",
"node",
"get",
"block",
"node",
"(",
")",
";",
"if",
"(",
"user",
"block",
"node",
"get",
"statement",
"nodes",
"(",
")",
"is",
"empty",
"(",
")",
")",
"{",
"throw",
"user",
"function",
"node",
"create",
"error",
"(",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"invalid",
"function",
"definition",
":",
"\"",
"+",
"\"",
"found",
"no",
"statements",
"for",
"function",
"\"",
"+",
"\"",
"[",
"\"",
"+",
"function",
"name",
"+",
"\"",
"]",
"with",
"[",
"\"",
"+",
"type",
"parameters",
"size",
"(",
")",
"+",
"\"",
"]",
"parameters",
"\"",
")",
")",
";",
"}",
"function",
"scope",
"set",
"condition",
"(",
"user",
"block",
"node",
",",
"last",
"source",
"class",
")",
";",
"visit",
"(",
"user",
"block",
"node",
",",
"function",
"scope",
"new",
"local",
"scope",
"(",
")",
")",
";",
"boolean",
"method",
"escape",
"=",
"function",
"scope",
"get",
"condition",
"(",
"user",
"block",
"node",
",",
"method",
"escape",
"class",
")",
";",
"boolean",
"is",
"auto",
"return",
"enabled",
"=",
"user",
"function",
"node",
"is",
"auto",
"return",
"enabled",
"(",
")",
";",
"if",
"(",
"method",
"escape",
"=",
"=",
"false",
"&",
"&",
"is",
"auto",
"return",
"enabled",
"=",
"=",
"false",
"&",
"&",
"return",
"type",
"!",
"=",
"void",
"class",
")",
"{",
"throw",
"user",
"function",
"node",
"create",
"error",
"(",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"invalid",
"function",
"definition",
":",
"\"",
"+",
"\"",
"not",
"all",
"paths",
"provide",
"a",
"return",
"value",
"for",
"function",
"\"",
"+",
"\"",
"[",
"\"",
"+",
"function",
"name",
"+",
"\"",
"]",
"with",
"[",
"\"",
"+",
"type",
"parameters",
"size",
"(",
")",
"+",
"\"",
"]",
"parameters",
"\"",
")",
")",
";",
"}",
"if",
"(",
"method",
"escape",
")",
"{",
"function",
"scope",
"set",
"condition",
"(",
"user",
"function",
"node",
",",
"method",
"escape",
"class",
")",
";",
"}",
"}"
]
|
[
"reports",
"a",
"failure",
"while",
"executing",
"work",
"<",
"note",
">",
"{",
"@",
"link",
"instrumenter",
"#",
"on",
"end",
"work",
"continuation",
"(",
"object",
")",
"}",
"(",
"object",
")",
"}",
"still",
"needs",
"to",
"be",
"invoked"
]
| [
"void",
"mark",
"failure",
"(",
"object",
"token",
",",
"throwable",
"th",
")",
";"
]
|
[
"test",
"serialization",
"of",
"outer",
"number",
"types"
]
| [
"public",
"single",
"<",
"big",
"decimal",
">",
"rx",
"fake",
"outer",
"number",
"serialize",
"(",
"big",
"decimal",
"body",
")",
"{",
"return",
"single",
"create",
"(",
"new",
"io",
"vertx",
"rx",
"java",
"single",
"on",
"subscribe",
"adapter",
"<",
">",
"(",
"fut",
"-",
">",
"delegate",
"fake",
"outer",
"number",
"serialize",
"(",
"body",
",",
"fut",
")",
")",
")",
";",
"}"
]
|
[
"creates",
"a",
"{",
"@",
"link",
"service",
"client",
"}",
"for",
"test",
"purposes"
]
| [
"public",
"static",
"service",
"client",
"create",
"client",
"(",
"configuration",
"conf",
")",
"throws",
"exception",
"{",
"service",
"client",
"client",
"=",
"new",
"service",
"client",
"(",
")",
"{",
"@",
"override",
"protected",
"path",
"add",
"jar",
"resource",
"(",
"string",
"app",
"name",
",",
"map",
"<",
"string",
",",
"local",
"resource",
">",
"local",
"resources",
")",
"throws",
"i",
"o",
"exception",
",",
"slider",
"exception",
"{",
"/",
"/",
"do",
"nothing",
",",
"the",
"unit",
"test",
"will",
"use",
"local",
"jars",
"return",
"null",
";",
"}",
"}",
";",
"client",
"init",
"(",
"conf",
")",
";",
"client",
"start",
"(",
")",
";",
"return",
"client",
";",
"}"
]
|
[
"sets",
"the",
"{",
"@",
"code",
"settings",
"enable",
"push",
"}",
"value"
]
| [
"public",
"http",
"2",
"settings",
"push",
"enabled",
"(",
"boolean",
"enabled",
")",
"{",
"put",
"(",
"settings",
"enable",
"push",
",",
"enabled",
"?",
"true",
":",
"false",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"resets",
"all",
"format",
"models",
"to",
"their",
"default",
"format"
]
| [
"public",
"void",
"set",
"default",
"formats",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"num",
"models",
";",
"i",
"+",
"+",
")",
"{",
"models",
"[",
"i",
"]",
"restore",
"from",
"xml",
"(",
"get",
"default",
"model",
"(",
"i",
")",
")",
";",
"}",
"}"
]
|
[
"segments",
"goes",
"across",
"all",
"active",
"shards"
]
| [
"protected",
"shards",
"iterator",
"shards",
"(",
"cluster",
"state",
"cluster",
"state",
",",
"indices",
"segments",
"request",
"request",
",",
"string",
"[",
"]",
"concrete",
"indices",
")",
"{",
"return",
"cluster",
"state",
"routing",
"table",
"(",
")",
"all",
"shards",
"(",
"concrete",
"indices",
")",
";",
"}"
]
|
[
"format",
"the",
"given",
"{",
"@",
"code",
"offset",
"date",
"time",
"}",
"object",
"into",
"string"
]
| [
"public",
"string",
"format",
"offset",
"date",
"time",
"(",
"offset",
"date",
"time",
"offset",
"date",
"time",
")",
"{",
"return",
"offset",
"date",
"time",
"formatter",
"format",
"(",
"offset",
"date",
"time",
")",
";",
"}"
]
|
[
"create",
"a",
"name",
"that",
"is",
"unique",
"in",
"both",
"namespaces",
"of",
"the",
"given",
"symbol",
"table"
]
| [
"public",
"static",
"string",
"get",
"unique",
"name",
"(",
"symbol",
"table",
"symbol",
"table",
",",
"string",
"name",
",",
"address",
"address",
",",
"namespace",
"namespace",
"1",
",",
"namespace",
"namespace",
"2",
",",
"symbol",
"type",
"type",
")",
"{",
"string",
"new",
"name",
"=",
"name",
";",
"int",
"i",
"=",
"1",
";",
"for",
"(",
";",
"i",
"<",
"integer",
"max",
"value",
";",
"i",
"+",
"+",
")",
"{",
"boolean",
"can",
"create",
"symbol",
"1",
"=",
"is",
"unique",
"symbol",
"name",
"(",
"symbol",
"table",
",",
"namespace",
"1",
",",
"new",
"name",
",",
"address",
",",
"type",
")",
";",
"boolean",
"can",
"create",
"symbol",
"2",
"=",
"is",
"unique",
"symbol",
"name",
"(",
"symbol",
"table",
",",
"namespace",
"2",
",",
"new",
"name",
",",
"address",
",",
"type",
")",
";",
"if",
"(",
"can",
"create",
"symbol",
"1",
"&",
"&",
"can",
"create",
"symbol",
"2",
")",
"{",
"return",
"new",
"name",
";",
"}",
"new",
"name",
"=",
"name",
"+",
"program",
"merge",
"symbol",
"conflict",
"suffix",
"+",
"i",
";",
"}",
"throw",
"new",
"assert",
"exception",
"(",
"\"",
"this",
"is",
"crazy",
"!",
"\"",
")",
";",
"}"
]
|
[
"test",
":",
"1",
"elements",
"contain",
"different",
"idf",
"values",
"calculated",
"by",
"{",
"@",
"link",
"weight",
"factory",
"}",
"expected",
"result",
":",
"not",
"equal"
]
| [
"public",
"void",
"test",
"equality",
"1",
"4",
"(",
")",
"{",
"hash",
"entry",
"[",
"]",
"hash",
"entries",
"1",
"=",
"new",
"hash",
"entry",
"[",
"]",
"{",
"entry",
"1",
"0",
"}",
";",
"hash",
"entry",
"[",
"]",
"hash",
"entries",
"2",
"=",
"new",
"hash",
"entry",
"[",
"]",
"{",
"entry",
"1",
"1",
"}",
";",
"vec",
"1",
"set",
"hash",
"entries",
"(",
"hash",
"entries",
"1",
")",
";",
"vec",
"2",
"set",
"hash",
"entries",
"(",
"hash",
"entries",
"2",
")",
";",
"assert",
"assert",
"false",
"(",
"\"",
"failed",
"to",
"distinguish",
"between",
"vectors",
"when",
"only",
"the",
"idf",
"value",
"is",
"different",
"\"",
",",
"vec",
"1",
"equals",
"(",
"vec",
"2",
")",
")",
";",
"}"
]
|
[
"check",
"id",
"bytes",
"(",
"throw",
"if",
"necessary",
")",
",",
"compression",
"method",
"(",
"throw",
"if",
"not",
"8",
")",
",",
"and",
"flag",
"bits",
"(",
"set",
"has",
"extra",
"field",
",",
"has",
"filename",
",",
"has",
"comment",
",",
"has",
"header",
"c",
"r",
"c",
")",
"ignore",
"mtime",
",",
"xfl",
",",
"os",
"caller",
"must",
"ensure",
"we",
"have",
"at",
"least",
"10",
"bytes",
"(",
"at",
"the",
"start",
"of",
"local",
"buf",
")"
]
| [
"private",
"void",
"process",
"basic",
"header",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"read",
"u",
"short",
"l",
"e",
"(",
"local",
"buf",
",",
"0",
")",
"!",
"=",
"gzip",
"magic",
"id",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"not",
"a",
"gzip",
"file",
"\"",
")",
";",
"}",
"if",
"(",
"read",
"u",
"byte",
"(",
"local",
"buf",
",",
"2",
")",
"!",
"=",
"gzip",
"deflate",
"method",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"gzip",
"data",
"not",
"compressed",
"with",
"deflate",
"method",
"\"",
")",
";",
"}",
"int",
"flg",
"=",
"read",
"u",
"byte",
"(",
"local",
"buf",
",",
"3",
")",
";",
"if",
"(",
"(",
"flg",
"&",
"gzip",
"flagbits",
"reserved",
")",
"!",
"=",
"0",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"unknown",
"gzip",
"format",
"(",
"reserved",
"flagbits",
"set",
")",
"\"",
")",
";",
"}",
"has",
"extra",
"field",
"=",
"(",
"(",
"flg",
"&",
"gzip",
"flagbit",
"extra",
"field",
")",
"!",
"=",
"0",
")",
";",
"has",
"filename",
"=",
"(",
"(",
"flg",
"&",
"gzip",
"flagbit",
"filename",
")",
"!",
"=",
"0",
")",
";",
"has",
"comment",
"=",
"(",
"(",
"flg",
"&",
"gzip",
"flagbit",
"comment",
")",
"!",
"=",
"0",
")",
";",
"has",
"header",
"c",
"r",
"c",
"=",
"(",
"(",
"flg",
"&",
"gzip",
"flagbit",
"header",
"crc",
")",
"!",
"=",
"0",
")",
";",
"}"
]
|
[
"checks",
"that",
"a",
"{",
"@",
"link",
"completable",
"future",
"}",
"won",
"'",
"t",
"complete",
"within",
"the",
"given",
"timeout"
]
| [
"public",
"static",
"matcher",
"<",
"completable",
"future",
"<",
"?",
">",
">",
"will",
"not",
"complete",
"(",
"duration",
"timeout",
")",
"{",
"return",
"new",
"will",
"not",
"complete",
"matcher",
"(",
"timeout",
")",
";",
"}"
]
|
[
"add",
"to",
"this",
"group",
"an",
"indicator",
"metric",
"with",
"a",
"function",
"that",
"returns",
"the",
"current",
"value"
]
| [
"public",
"<",
"t",
">",
"void",
"add",
"value",
"metric",
"(",
"metric",
"name",
"template",
"name",
"template",
",",
"final",
"literal",
"supplier",
"<",
"t",
">",
"supplier",
")",
"{",
"metric",
"name",
"metric",
"name",
"=",
"metric",
"name",
"(",
"name",
"template",
")",
";",
"if",
"(",
"metrics",
"(",
")",
"metric",
"(",
"metric",
"name",
")",
"=",
"=",
"null",
")",
"{",
"metrics",
"(",
")",
"add",
"metric",
"(",
"metric",
"name",
",",
"(",
"gauge",
"<",
"t",
">",
")",
"(",
"config",
",",
"now",
")",
"-",
">",
"supplier",
"metric",
"value",
"(",
"now",
")",
")",
";",
"}",
"}"
]
|
[
"mark",
"directory",
"scan",
"is",
"completed"
]
| [
"public",
"synchronized",
"void",
"mark",
"scan",
"completed",
"(",
")",
"{",
"this",
"fully",
"scanned",
"=",
"true",
";",
"}"
]
|
[
"get",
"namespace",
"boolean"
]
| [
"public",
"boolean",
"get",
"namespace",
"boolean",
"(",
")",
"{",
"return",
"namespace",
"boolean",
";",
"}"
]
|
[
"@",
"t",
"c",
"description",
":",
",",
",",
",",
"@",
"test",
"step",
":",
"@",
"expect",
"result",
":"
]
| [
"public",
"void",
"register",
"instance",
"api",
"(",
")",
"throws",
"exception",
"{",
"string",
"service",
"name",
"=",
"naming",
"base",
"random",
"domain",
"name",
"(",
")",
";",
"naming",
"service",
"create",
"(",
"service",
"name",
",",
"constants",
"default",
"namespace",
"id",
")",
";",
"instance",
"register",
"(",
"service",
"name",
",",
"constants",
"default",
"namespace",
"id",
",",
"\"",
"33",
"33",
"33",
"33",
"\"",
",",
"test",
"port2",
"4",
"dom",
"1",
")",
";",
"response",
"entity",
"<",
"string",
">",
"response",
"=",
"request",
"(",
"naming",
"controller",
"path",
"+",
"\"",
"/",
"instance",
"/",
"list",
"\"",
",",
"params",
"new",
"params",
"(",
")",
"append",
"param",
"(",
"\"",
"service",
"name",
"\"",
",",
"service",
"name",
")",
"/",
"/",
"append",
"param",
"(",
"\"",
"namespace",
"id",
"\"",
",",
"constants",
"default",
"namespace",
"id",
")",
"done",
"(",
")",
",",
"string",
"class",
")",
";",
"assert",
"assert",
"true",
"(",
"response",
"get",
"status",
"code",
"(",
")",
"is",
"2xx",
"successful",
"(",
")",
")",
";",
"json",
"node",
"json",
"=",
"jackson",
"utils",
"to",
"obj",
"(",
"response",
"get",
"body",
"(",
")",
")",
";",
"assert",
"assert",
"equals",
"(",
"1",
",",
"json",
"get",
"(",
"\"",
"hosts",
"\"",
")",
"size",
"(",
")",
")",
";",
"instance",
"deregister",
"(",
"service",
"name",
",",
"constants",
"default",
"namespace",
"id",
",",
"\"",
"33",
"33",
"33",
"33",
"\"",
",",
"test",
"port2",
"4",
"dom",
"1",
")",
";",
"naming",
"service",
"delete",
"(",
"service",
"name",
",",
"constants",
"default",
"namespace",
"id",
")",
";",
"}"
]
|
[
"the",
"search",
"used",
"to",
"find",
"documents",
"to",
"process"
]
| [
"public",
"search",
"request",
"builder",
"source",
"(",
")",
"{",
"return",
"source",
";",
"}"
]
|
[
"reads",
"all",
"bytes",
"from",
"an",
"input",
"stream",
"into",
"a",
"byte",
"array",
"the",
"given",
"expected",
"size",
"is",
"used",
"to",
"create",
"an",
"initial",
"byte",
"array",
",",
"but",
"if",
"the",
"actual",
"number",
"of",
"bytes",
"read",
"from",
"the",
"stream",
"differs",
",",
"the",
"correct",
"result",
"will",
"be",
"returned",
"anyway"
]
| [
"public",
"static",
"byte",
"[",
"]",
"to",
"byte",
"array",
"(",
"input",
"stream",
"in",
",",
"int",
"expected",
"size",
")",
"throws",
"i",
"o",
"exception",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"expected",
"size",
"]",
";",
"int",
"remaining",
"=",
"expected",
"size",
";",
"while",
"(",
"remaining",
">",
"0",
")",
"{",
"int",
"off",
"=",
"expected",
"size",
"-",
"remaining",
";",
"int",
"read",
"=",
"in",
"read",
"(",
"bytes",
",",
"off",
",",
"remaining",
")",
";",
"if",
"(",
"read",
"=",
"=",
"-",
"1",
")",
"{",
"/",
"/",
"end",
"of",
"stream",
"before",
"reading",
"expected",
"size",
"bytes",
"/",
"/",
"just",
"return",
"the",
"bytes",
"read",
"so",
"far",
"return",
"arrays",
"copy",
"of",
"(",
"bytes",
",",
"off",
")",
";",
"}",
"remaining",
"-",
"=",
"read",
";",
"}",
"/",
"/",
"bytes",
"is",
"now",
"full",
"int",
"b",
"=",
"in",
"read",
"(",
")",
";",
"if",
"(",
"b",
"=",
"=",
"-",
"1",
")",
"{",
"return",
"bytes",
";",
"}",
"/",
"/",
"the",
"stream",
"was",
"longer",
",",
"so",
"read",
"the",
"rest",
"normally",
"fast",
"byte",
"array",
"output",
"stream",
"out",
"=",
"new",
"fast",
"byte",
"array",
"output",
"stream",
"(",
")",
";",
"out",
"write",
"(",
"b",
")",
";",
"/",
"/",
"write",
"the",
"byte",
"we",
"read",
"when",
"testing",
"for",
"end",
"of",
"stream",
"copy",
"(",
"in",
",",
"out",
")",
";",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"bytes",
"length",
"+",
"out",
"size",
"(",
")",
"]",
";",
"system",
"arraycopy",
"(",
"bytes",
",",
"0",
",",
"result",
",",
"0",
",",
"bytes",
"length",
")",
";",
"out",
"write",
"to",
"(",
"result",
",",
"bytes",
"length",
")",
";",
"return",
"result",
";",
"}"
]
|
[
"trusted",
"certificates",
"for",
"verifying",
"the",
"remote",
"endpoint",
"'",
"s",
"certificate",
",",
"{",
"@",
"code",
"null",
"}",
"uses",
"the",
"system",
"default"
]
| [
"public",
"ssl",
"context",
"builder",
"trust",
"manager",
"(",
"x",
"5",
"0",
"9",
"certificate",
"trust",
"cert",
"collection",
")",
"{",
"this",
"trust",
"cert",
"collection",
"=",
"trust",
"cert",
"collection",
"!",
"=",
"null",
"?",
"trust",
"cert",
"collection",
"clone",
"(",
")",
":",
"null",
";",
"trust",
"manager",
"factory",
"=",
"null",
";",
"return",
"this",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"declawed",
"'"
]
| [
"public",
"void",
"declawed",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"declawed",
"}"
]
|
[
"acquire",
"lock",
"success"
]
| [
"public",
"void",
"acquire",
"lock",
"success",
"(",
"branch",
"session",
"branch",
"session",
")",
"throws",
"exception",
"{",
"lock",
"manager",
"lock",
"manager",
"=",
"new",
"file",
"lock",
"manager",
"for",
"test",
"(",
")",
";",
"assertions",
"assert",
"true",
"(",
"lock",
"manager",
"acquire",
"lock",
"(",
"branch",
"session",
")",
")",
";",
"}"
]
|
[
"get",
"the",
"optional",
"id",
"corresponding",
"to",
"this",
"allocation",
"request",
"this",
"id",
"is",
"an",
"identifier",
"for",
"different",
"{",
"@",
"code",
"resource",
"request",
"}",
"s",
"from",
"the",
"<",
"b",
">",
"same",
"application",
"<",
"b",
">",
"the",
"allocated",
"{",
"@",
"code",
"container",
"}",
"(",
"s",
")",
"received",
"as",
"part",
"of",
"the",
"{",
"@",
"code",
"allocate",
"response",
"}",
"response",
"will",
"have",
"the",
"id",
"corresponding",
"to",
"the",
"original",
"{",
"@",
"code",
"resource",
"request",
"}",
"for",
"which",
"the",
"rm",
"made",
"the",
"allocation",
"the",
"scheduler",
"may",
"return",
"multiple",
"{",
"@",
"code",
"allocate",
"response",
"}",
"s",
"corresponding",
"to",
"the",
"same",
"id",
"as",
"and",
"when",
"scheduler",
"allocates",
"{",
"@",
"code",
"container",
"}",
"(",
"s",
")",
"<",
"b",
">",
"applications",
"<",
"b",
">",
"can",
"continue",
"to",
"completely",
"ignore",
"the",
"returned",
"id",
"in",
"the",
"response",
"and",
"use",
"the",
"allocation",
"for",
"any",
"of",
"their",
"outstanding",
"requests",
"if",
"one",
"wishes",
"to",
"replace",
"an",
"entire",
"{",
"@",
"code",
"resource",
"request",
"}",
"corresponding",
"to",
"a",
"specific",
"id",
",",
"they",
"can",
"simply",
"cancel",
"the",
"corresponding",
"{",
"@",
"code",
"resource",
"request",
"}",
"and",
"submit",
"a",
"new",
"one",
"afresh"
]
| [
"public",
"long",
"get",
"allocation",
"request",
"id",
"(",
")",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
")",
";",
"}"
]
|
[
"compares",
"two",
"lists",
"recursively",
",",
"but",
"using",
"arrays",
"comparisons",
"for",
"byte",
"[",
"]",
"through",
"arrays",
"equals",
"(",
"byte",
"[",
"]",
",",
"byte",
"[",
"]",
")"
]
| [
"private",
"static",
"void",
"assert",
"list",
"equals",
"(",
"list",
"<",
"object",
">",
"expected",
",",
"list",
"<",
"object",
">",
"actual",
")",
"{",
"assert",
"equals",
"(",
"expected",
"size",
"(",
")",
",",
"actual",
"size",
"(",
")",
")",
";",
"iterator",
"<",
"object",
">",
"actual",
"iterator",
"=",
"actual",
"iterator",
"(",
")",
";",
"for",
"(",
"object",
"expected",
"value",
":",
"expected",
")",
"{",
"object",
"actual",
"value",
"=",
"actual",
"iterator",
"next",
"(",
")",
";",
"assert",
"object",
"equals",
"(",
"expected",
"value",
",",
"actual",
"value",
")",
";",
"}",
"}"
]
|
[
"moves",
"the",
"components",
"between",
"the",
"start",
"index",
"(",
"inclusive",
")",
"and",
"the",
"end",
"index",
"(",
"exclusive",
")",
"to",
"the",
"new",
"index",
"(",
"relative",
"to",
"the",
"initial",
"component",
"set",
")"
]
| [
"private",
"boolean",
"shift",
"components",
"up",
"(",
"int",
"start",
"row",
"index",
",",
"int",
"end",
"row",
"index",
")",
"{",
"int",
"num",
"comps",
"=",
"get",
"num",
"components",
"(",
")",
";",
"if",
"(",
"(",
"start",
"row",
"index",
">",
"end",
"row",
"index",
")",
"|",
"|",
"start",
"row",
"index",
"<",
"=",
"0",
"|",
"|",
"start",
"row",
"index",
">",
"=",
"num",
"comps",
"|",
"|",
"end",
"row",
"index",
"<",
"=",
"0",
"|",
"|",
"end",
"row",
"index",
">",
"=",
"num",
"comps",
")",
"{",
"return",
"false",
";",
"}",
"data",
"type",
"component",
"comp",
"=",
"get",
"component",
"(",
"start",
"row",
"index",
"-",
"1",
")",
";",
"delete",
"component",
"(",
"start",
"row",
"index",
"-",
"1",
")",
";",
"try",
"{",
"insert",
"(",
"end",
"row",
"index",
",",
"comp",
"get",
"data",
"type",
"(",
")",
",",
"comp",
"get",
"length",
"(",
")",
",",
"comp",
"get",
"field",
"name",
"(",
")",
",",
"comp",
"get",
"comment",
"(",
")",
")",
";",
"}",
"catch",
"(",
"invalid",
"data",
"type",
"exception",
"e",
")",
"{",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}"
]
|
[
"perform",
"a",
"single",
"{",
"@",
"code",
"read",
"(",
")",
"}",
"from",
"{",
"@",
"code",
"input",
"stream",
"}",
"into",
"{",
"@",
"code",
"copy",
"buffer",
"}",
",",
"handling",
"an",
"eof",
"by",
"throwing",
"an",
"{",
"@",
"link",
"e",
"o",
"f",
"exception",
"}",
"rather",
"than",
"returning",
"{",
"@",
"code",
"-",
"1",
"}",
"returns",
"the",
"number",
"of",
"bytes",
"read",
",",
"which",
"is",
"always",
"positive",
"most",
"of",
"its",
"arguments",
"are",
"there",
"simply",
"to",
"make",
"the",
"message",
"of",
"the",
"{",
"@",
"link",
"e",
"o",
"f",
"exception",
"}",
"more",
"informative"
]
| [
"private",
"static",
"int",
"read",
"safe",
"(",
"input",
"stream",
"input",
"stream",
",",
"byte",
"[",
"]",
"copy",
"buffer",
",",
"long",
"range",
"start",
",",
"long",
"range",
"end",
",",
"long",
"remaining",
",",
"cache",
"file",
"reference",
"cache",
"file",
"reference",
")",
"throws",
"i",
"o",
"exception",
"{",
"final",
"int",
"len",
"=",
"(",
"remaining",
"<",
"copy",
"buffer",
"length",
")",
"?",
"to",
"int",
"bytes",
"(",
"remaining",
")",
":",
"copy",
"buffer",
"length",
";",
"final",
"int",
"bytes",
"read",
"=",
"input",
"stream",
"read",
"(",
"copy",
"buffer",
",",
"0",
",",
"len",
")",
";",
"if",
"(",
"bytes",
"read",
"=",
"=",
"-",
"1",
")",
"{",
"throw",
"new",
"e",
"o",
"f",
"exception",
"(",
"string",
"format",
"(",
"locale",
"root",
",",
"\"",
"unexpected",
"eof",
"reading",
"[",
"%",
"d",
"-",
"%",
"d",
"]",
"(",
"[",
"%",
"d",
"]",
"bytes",
"remaining",
")",
"from",
"%",
"s",
"\"",
",",
"range",
"start",
",",
"range",
"end",
",",
"remaining",
",",
"cache",
"file",
"reference",
")",
")",
";",
"}",
"assert",
"bytes",
"read",
">",
"0",
":",
"bytes",
"read",
";",
"return",
"bytes",
"read",
";",
"}"
]
|
[
"retrieves",
"the",
"value",
"in",
"queue",
"without",
"removing",
"it",
"indexing",
"is",
"from",
"the",
"front",
"to",
"back",
",",
"zero",
"based",
"therefore",
"get",
"(",
"0",
")",
"is",
"the",
"same",
"as",
"{",
"@",
"link",
"#",
"first",
"(",
")",
"}"
]
| [
"public",
"t",
"get",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"0",
")",
"throw",
"new",
"index",
"out",
"of",
"bounds",
"exception",
"(",
"\"",
"index",
"can",
"'",
"t",
"be",
"<",
"0",
":",
"\"",
"+",
"index",
")",
";",
"if",
"(",
"index",
">",
"=",
"size",
")",
"throw",
"new",
"index",
"out",
"of",
"bounds",
"exception",
"(",
"\"",
"index",
"can",
"'",
"t",
"be",
">",
"=",
"size",
":",
"\"",
"+",
"index",
"+",
"\"",
">",
"=",
"\"",
"+",
"size",
")",
";",
"final",
"t",
"[",
"]",
"values",
"=",
"this",
"values",
";",
"int",
"i",
"=",
"head",
"+",
"index",
";",
"if",
"(",
"i",
">",
"=",
"values",
"length",
")",
"{",
"i",
"-",
"=",
"values",
"length",
";",
"}",
"return",
"values",
"[",
"i",
"]",
";",
"}"
]
|
[
"returns",
"a",
"predicate",
"that",
"evaluates",
"to",
"true",
"if",
"and",
"only",
"if",
"the",
"input",
"is",
"equivalent",
"to",
"{",
"@",
"code",
"target",
"}",
"according",
"to",
"this",
"equivalence",
"relation"
]
| [
"public",
"final",
"predicate",
"<",
"t",
">",
"equivalent",
"to",
"(",
"@",
"nullable",
"t",
"target",
")",
"{",
"return",
"new",
"equivalent",
"to",
"predicate",
"<",
"t",
">",
"(",
"this",
",",
"target",
")",
";",
"}"
]
|
[
"called",
"to",
"indicate",
"a",
"fullscreen",
"mode",
"change"
]
| [
"void",
"on",
"full",
"screen",
"mode",
"changed",
"(",
"boolean",
"is",
"full",
"screen",
")",
";"
]
|
[
"is",
"the",
"cluster",
"currently",
"in",
"safe",
"mode",
"?"
]
| [
"public",
"boolean",
"is",
"in",
"safe",
"mode",
"(",
")",
"{",
"return",
"namesystem",
"is",
"in",
"safe",
"mode",
"(",
")",
";",
"}"
]
|
[
"get",
"the",
"current",
"position",
"in",
"file"
]
| [
"long",
"get",
"current",
"pos",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"fs",
"out",
"get",
"pos",
"(",
")",
"+",
"fs",
"buffered",
"output",
"size",
"(",
")",
";",
"}"
]
|
[
"tries",
"to",
"get",
"a",
"read",
"only",
"adapter",
"for",
"the",
"database",
"whose",
"handle",
"is",
"passed",
"to",
"this",
"method"
]
| [
"static",
"source",
"archive",
"adapter",
"find",
"read",
"only",
"adapter",
"(",
"d",
"b",
"handle",
"handle",
")",
"{",
"return",
"new",
"source",
"archive",
"adapter",
"no",
"table",
"(",
"handle",
")",
";",
"}"
]
|
[
"close",
"the",
"underlying",
"input",
"stream",
"and",
"clear",
"up",
"any",
"resources"
]
| [
"void",
"close",
"(",
")",
"throws",
"i",
"o",
"exception",
";"
]
|
[
"method",
"to",
"capture",
"dataitem",
"type",
"i",
"ds",
"that",
"have",
"not",
"been",
"seen",
"before",
"in",
"development"
]
| [
"public",
"void",
"witness",
"data",
"type",
"id",
"(",
"int",
"data",
"type",
"id",
")",
"{",
"if",
"(",
"!",
"data",
"types",
"seen",
"contains",
"(",
"data",
"type",
"id",
")",
")",
"{",
"new",
"data",
"types",
"add",
"(",
"data",
"type",
"id",
")",
";",
"}",
"}"
]
|
[
"the",
"name",
"of",
"the",
"resource",
"(",
"in",
"the",
"form",
"package",
":",
"typename",
")",
"<",
"code",
">",
"optional",
"string",
"resource",
"name",
"=",
"1",
";",
"<",
"code",
">"
]
| [
"private",
"void",
"set",
"resource",
"name",
"bytes",
"(",
"com",
"google",
"protobuf",
"byte",
"string",
"value",
")",
"{",
"if",
"(",
"value",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"null",
"pointer",
"exception",
"(",
")",
";",
"}",
"bit",
"field",
"0",
"|",
"=",
"0x",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"1",
";",
"resource",
"name",
"=",
"value",
"to",
"string",
"utf",
"8",
"(",
")",
";",
"}"
]
|
[
"returns",
"a",
"node",
"by",
"uuid"
]
| [
"public",
"disk",
"balancer",
"data",
"node",
"get",
"node",
"by",
"u",
"u",
"i",
"d",
"(",
"string",
"uuid",
")",
"{",
"return",
"host",
"u",
"u",
"i",
"d",
"get",
"(",
"uuid",
")",
";",
"}"
]
|
[
"returns",
"a",
"list",
"scheduled",
"tasks",
"in",
"the",
"group"
]
| [
"public",
"list",
"<",
"g",
"scheduled",
"task",
">",
"get",
"tasks",
"(",
")",
"{",
"array",
"list",
"<",
"g",
"scheduled",
"task",
">",
"list",
"=",
"new",
"array",
"list",
"<",
"g",
"scheduled",
"task",
">",
"(",
"task",
"list",
")",
";",
"collections",
"sort",
"(",
"list",
")",
";",
"return",
"list",
";",
"}"
]
|
[
"tests",
"basic",
"properties",
"(",
"other",
"than",
"those",
"of",
"specific",
"resources",
",",
"covered",
"elsewhere",
")"
]
| [
"public",
"void",
"test",
"resource",
"properties",
"(",
")",
"{",
"offer",
"offer",
"=",
"new",
"offer",
"(",
"offer",
"(",
"resources",
"(",
")",
",",
"attrs",
"(",
")",
")",
")",
";",
"assert",
"assert",
"not",
"null",
"(",
"offer",
"get",
"resources",
"(",
")",
")",
";",
"assert",
"assert",
"equals",
"(",
"hostname",
",",
"offer",
"hostname",
"(",
")",
")",
";",
"assert",
"assert",
"equals",
"(",
"agent",
"id",
"get",
"value",
"(",
")",
",",
"offer",
"get",
"v",
"m",
"i",
"d",
"(",
")",
")",
";",
"assert",
"assert",
"not",
"null",
"(",
"offer",
"get",
"offer",
"(",
")",
")",
";",
"assert",
"assert",
"equals",
"(",
"offer",
"id",
"get",
"value",
"(",
")",
",",
"offer",
"get",
"id",
"(",
")",
")",
";",
"assert",
"assert",
"not",
"equals",
"(",
"0l",
",",
"offer",
"get",
"offered",
"time",
"(",
")",
")",
";",
"assert",
"assert",
"not",
"null",
"(",
"offer",
"get",
"attribute",
"map",
"(",
")",
")",
";",
"assert",
"assert",
"not",
"null",
"(",
"offer",
"to",
"string",
"(",
")",
")",
";",
"}"
]
|
[
"sets",
"the",
"color",
"of",
"the",
"selector",
"to",
"be",
"draw",
"over",
"the",
"circular",
"image",
"view",
"be",
"sure",
"to",
"provide",
"some",
"opacity"
]
| [
"public",
"void",
"set",
"selector",
"color",
"(",
"int",
"selector",
"color",
")",
"{",
"this",
"selector",
"filter",
"=",
"new",
"porter",
"duff",
"color",
"filter",
"(",
"selector",
"color",
",",
"porter",
"duff",
"mode",
"src",
"atop",
")",
";",
"this",
"invalidate",
"(",
")",
";",
"}"
]
|
[
"check",
"if",
"replica",
"belonging",
"to",
"datanode",
"is",
"corrupt"
]
| [
"boolean",
"is",
"replica",
"corrupt",
"(",
"block",
"blk",
",",
"datanode",
"descriptor",
"node",
")",
"{",
"collection",
"<",
"datanode",
"descriptor",
">",
"nodes",
"=",
"get",
"nodes",
"(",
"blk",
")",
";",
"return",
"(",
"(",
"nodes",
"!",
"=",
"null",
")",
"&",
"&",
"(",
"nodes",
"contains",
"(",
"node",
")",
")",
")",
";",
"}"
]
|
[
"extracts",
"all",
"{",
"@",
"link",
"rpc",
"gateway",
"}",
"interfaces",
"implemented",
"by",
"the",
"given",
"clazz"
]
| [
"public",
"static",
"set",
"<",
"class",
"<",
"?",
"extends",
"rpc",
"gateway",
">",
">",
"extract",
"implemented",
"rpc",
"gateways",
"(",
"class",
"<",
"?",
">",
"clazz",
")",
"{",
"hash",
"set",
"<",
"class",
"<",
"?",
"extends",
"rpc",
"gateway",
">",
">",
"interfaces",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"while",
"(",
"clazz",
"!",
"=",
"null",
")",
"{",
"for",
"(",
"class",
"<",
"?",
">",
"interfaze",
":",
"clazz",
"get",
"interfaces",
"(",
")",
")",
"{",
"if",
"(",
"rpc",
"gateway",
"class",
"is",
"assignable",
"from",
"(",
"interfaze",
")",
")",
"{",
"interfaces",
"add",
"(",
"(",
"class",
"<",
"?",
"extends",
"rpc",
"gateway",
">",
")",
"interfaze",
")",
";",
"}",
"}",
"clazz",
"=",
"clazz",
"get",
"superclass",
"(",
")",
";",
"}",
"return",
"interfaces",
";",
"}"
]
|
[
"return",
"the",
"example",
"value",
"of",
"the",
"property"
]
| [
"public",
"string",
"to",
"example",
"value",
"(",
"schema",
"p",
")",
"{",
"if",
"(",
"model",
"utils",
"is",
"string",
"schema",
"(",
"p",
")",
")",
"{",
"if",
"(",
"p",
"get",
"example",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"\"",
"\\",
"\"",
"\"",
"+",
"p",
"get",
"example",
"(",
")",
"to",
"string",
"(",
")",
"+",
"\"",
"\\",
"\"",
"\"",
";",
"}",
"}",
"else",
"if",
"(",
"model",
"utils",
"is",
"boolean",
"schema",
"(",
"p",
")",
")",
"{",
"if",
"(",
"p",
"get",
"example",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"p",
"get",
"example",
"(",
")",
"to",
"string",
"(",
")",
";",
"}",
"}",
"else",
"if",
"(",
"model",
"utils",
"is",
"date",
"schema",
"(",
"p",
")",
")",
"{",
"/",
"/",
"todo",
"}",
"else",
"if",
"(",
"model",
"utils",
"is",
"date",
"time",
"schema",
"(",
"p",
")",
")",
"{",
"/",
"/",
"todo",
"}",
"else",
"if",
"(",
"model",
"utils",
"is",
"number",
"schema",
"(",
"p",
")",
")",
"{",
"if",
"(",
"p",
"get",
"example",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"p",
"get",
"example",
"(",
")",
"to",
"string",
"(",
")",
";",
"}",
"}",
"else",
"if",
"(",
"model",
"utils",
"is",
"integer",
"schema",
"(",
"p",
")",
")",
"{",
"if",
"(",
"p",
"get",
"example",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"p",
"get",
"example",
"(",
")",
"to",
"string",
"(",
")",
";",
"}",
"}",
"return",
"null",
";",
"}"
]
|
[
"returns",
"{",
"@",
"code",
"true",
"}",
"if",
"a",
"header",
"with",
"the",
"{",
"@",
"code",
"name",
"}",
"and",
"{",
"@",
"code",
"value",
"}",
"exists",
",",
"{",
"@",
"code",
"false",
"}",
"otherwise",
"if",
"{",
"@",
"code",
"ignore",
"case",
"}",
"is",
"{",
"@",
"code",
"true",
"}",
"then",
"a",
"case",
"insensitive",
"compare",
"is",
"done",
"on",
"the",
"value"
]
| [
"public",
"boolean",
"contains",
"(",
"char",
"sequence",
"name",
",",
"char",
"sequence",
"value",
",",
"boolean",
"ignore",
"case",
")",
"{",
"return",
"contains",
"(",
"name",
"to",
"string",
"(",
")",
",",
"value",
"to",
"string",
"(",
")",
",",
"ignore",
"case",
")",
";",
"}"
]
|
[
"return",
"a",
"{",
"@",
"link",
"binary",
"doc",
"values",
"}",
"instance",
"that",
"can",
"be",
"used",
"to",
"sort",
"documents",
"with",
"this",
"mode",
"and",
"the",
"provided",
"values",
"when",
"a",
"document",
"has",
"no",
"value",
",",
"<",
"code",
">",
"missing",
"value",
"<",
"code",
">",
"is",
"returned",
"allowed",
"modes",
":",
"min",
",",
"max"
]
| [
"public",
"binary",
"doc",
"values",
"select",
"(",
"final",
"sorted",
"binary",
"doc",
"values",
"values",
",",
"final",
"bytes",
"ref",
"missing",
"value",
")",
"{",
"final",
"binary",
"doc",
"values",
"singleton",
"=",
"field",
"data",
"unwrap",
"singleton",
"(",
"values",
")",
";",
"if",
"(",
"singleton",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"missing",
"value",
"=",
"=",
"null",
")",
"{",
"return",
"singleton",
";",
"}",
"return",
"new",
"abstract",
"binary",
"doc",
"values",
"(",
")",
"{",
"private",
"bytes",
"ref",
"value",
";",
"@",
"override",
"public",
"boolean",
"advance",
"exact",
"(",
"int",
"target",
")",
"throws",
"i",
"o",
"exception",
"{",
"this",
"value",
"=",
"singleton",
"advance",
"exact",
"(",
"target",
")",
"?",
"singleton",
"binary",
"value",
"(",
")",
":",
"missing",
"value",
";",
"return",
"true",
";",
"}",
"@",
"override",
"public",
"bytes",
"ref",
"binary",
"value",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"this",
"value",
";",
"}",
"}",
";",
"}",
"else",
"{",
"return",
"new",
"abstract",
"binary",
"doc",
"values",
"(",
")",
"{",
"private",
"bytes",
"ref",
"value",
";",
"@",
"override",
"public",
"boolean",
"advance",
"exact",
"(",
"int",
"target",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"values",
"advance",
"exact",
"(",
"target",
")",
")",
"{",
"value",
"=",
"pick",
"(",
"values",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"value",
"=",
"missing",
"value",
";",
"return",
"missing",
"value",
"!",
"=",
"null",
";",
"}",
"}",
"@",
"override",
"public",
"bytes",
"ref",
"binary",
"value",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"value",
";",
"}",
"}",
";",
"}",
"}"
]
|
[
"sees",
"if",
"the",
"class",
"file",
"header",
"version",
"are",
"within",
"range"
]
| [
"private",
"boolean",
"is",
"good",
"version",
"(",
"int",
"minor",
"version",
",",
"int",
"major",
"version",
")",
"{",
"/",
"*",
"valid",
"version",
"ranges",
"are",
"typically",
"of",
"the",
"form",
"*",
"\"",
"a",
"0",
"through",
"b",
"c",
"inclusive",
"\"",
"where",
"a",
"<",
"=",
"b",
"and",
"c",
">",
"=",
"0",
",",
"*",
"which",
"is",
"why",
"we",
"don",
"'",
"t",
"have",
"a",
"class",
"file",
"min",
"minor",
"version",
"*",
"/",
"if",
"(",
"minor",
"version",
">",
"=",
"0",
")",
"{",
"/",
"*",
"check",
"against",
"max",
"first",
"to",
"handle",
"the",
"case",
"where",
"*",
"min",
"major",
"=",
"=",
"max",
"major",
"*",
"/",
"if",
"(",
"major",
"version",
"=",
"=",
"class",
"file",
"max",
"major",
"version",
")",
"{",
"if",
"(",
"minor",
"version",
"<",
"=",
"class",
"file",
"max",
"minor",
"version",
")",
"{",
"return",
"true",
";",
"}",
"}",
"else",
"if",
"(",
"major",
"version",
"<",
"class",
"file",
"max",
"major",
"version",
"&",
"&",
"major",
"version",
">",
"=",
"class",
"file",
"min",
"major",
"version",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
]
|
[
"get",
"header",
"type",
"as",
"string",
"elf",
"program",
"header",
"type",
"name",
"will",
"be",
"returned",
"if",
"know",
",",
"otherwise",
"a",
"numeric",
"name",
"of",
"the",
"form",
"\"",
"pt",
"0x",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"\"",
"will",
"be",
"returned"
]
| [
"public",
"string",
"get",
"type",
"as",
"string",
"(",
")",
"{",
"elf",
"program",
"header",
"type",
"program",
"header",
"type",
"=",
"header",
"get",
"program",
"header",
"type",
"(",
"p",
"type",
")",
";",
"if",
"(",
"program",
"header",
"type",
"!",
"=",
"null",
")",
"{",
"return",
"program",
"header",
"type",
"name",
";",
"}",
"return",
"\"",
"pt",
"0x",
"\"",
"+",
"string",
"utilities",
"pad",
"(",
"integer",
"to",
"hex",
"string",
"(",
"p",
"type",
")",
",",
"'",
"0",
"'",
",",
"8",
")",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"email",
"'"
]
| [
"public",
"void",
"email",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"email",
"}"
]
|
[
"clones",
"the",
"ok",
"builder",
"given",
"in",
"parameter",
",",
"adds",
"the",
"auth",
"interceptors",
"and",
"uses",
"it",
"to",
"configure",
"the",
"retrofit"
]
| [
"public",
"void",
"configure",
"from",
"okclient",
"(",
"ok",
"http",
"client",
"ok",
"client",
")",
"{",
"this",
"ok",
"builder",
"=",
"ok",
"client",
"new",
"builder",
"(",
")",
";",
"add",
"auths",
"to",
"ok",
"builder",
"(",
"this",
"ok",
"builder",
")",
";",
"}"
]
|
[
"upload",
"part",
"of",
"a",
"multi",
"-",
"partition",
"file",
"increments",
"the",
"write",
"and",
"put",
"counters",
"important",
":",
"this",
"call",
"does",
"not",
"close",
"any",
"input",
"stream",
"in",
"the",
"request",
"retry",
"policy",
":",
"none"
]
| [
"upload",
"part",
"result",
"upload",
"part",
"(",
"upload",
"part",
"request",
"request",
")",
"throws",
"amazon",
"client",
"exception",
"{",
"long",
"len",
"=",
"request",
"get",
"part",
"size",
"(",
")",
";",
"increment",
"put",
"start",
"statistics",
"(",
"len",
")",
";",
"try",
"{",
"set",
"optional",
"upload",
"part",
"request",
"parameters",
"(",
"request",
")",
";",
"upload",
"part",
"result",
"upload",
"part",
"result",
"=",
"s",
"3",
"upload",
"part",
"(",
"request",
")",
";",
"increment",
"put",
"completed",
"statistics",
"(",
"true",
",",
"len",
")",
";",
"return",
"upload",
"part",
"result",
";",
"}",
"catch",
"(",
"amazon",
"client",
"exception",
"e",
")",
"{",
"increment",
"put",
"completed",
"statistics",
"(",
"false",
",",
"len",
")",
";",
"throw",
"e",
";",
"}",
"}"
]
|
[
"get",
"byte",
"from",
"segments"
]
| [
"public",
"static",
"byte",
"get",
"byte",
"(",
"memory",
"segment",
"[",
"]",
"segments",
",",
"int",
"offset",
")",
"{",
"if",
"(",
"in",
"first",
"segment",
"(",
"segments",
",",
"offset",
",",
"1",
")",
")",
"{",
"return",
"segments",
"[",
"0",
"]",
"get",
"(",
"offset",
")",
";",
"}",
"else",
"{",
"return",
"get",
"byte",
"multi",
"segments",
"(",
"segments",
",",
"offset",
")",
";",
"}",
"}"
]
|
[
"create",
"a",
"mutable",
"rate",
"metric"
]
| [
"public",
"mutable",
"rate",
"new",
"rate",
"(",
"string",
"name",
",",
"string",
"description",
")",
"{",
"return",
"new",
"rate",
"(",
"name",
",",
"description",
",",
"false",
")",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"prefix",
"ns",
"boolean",
"'"
]
| [
"public",
"void",
"prefix",
"ns",
"boolean",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"prefix",
"ns",
"boolean",
"}"
]
|
[
"this",
"method",
"executes",
"a",
"search",
"and",
"checks",
"if",
"the",
"thread",
"context",
"was",
"enriched",
"with",
"the",
"ml",
"origin"
]
| [
"private",
"void",
"assert",
"execution",
"with",
"origin",
"(",
"map",
"<",
"string",
",",
"string",
">",
"stored",
"headers",
",",
"client",
"client",
")",
"{",
"string",
"origin",
"name",
"=",
"random",
"from",
"(",
"client",
"helper",
"ml",
"origin",
",",
"client",
"helper",
"watcher",
"origin",
",",
"client",
"helper",
"rollup",
"origin",
")",
";",
"client",
"helper",
"execute",
"with",
"headers",
"(",
"stored",
"headers",
",",
"origin",
"name",
",",
"client",
",",
"(",
")",
"-",
">",
"{",
"object",
"origin",
"=",
"client",
"thread",
"pool",
"(",
")",
"get",
"thread",
"context",
"(",
")",
"get",
"transient",
"(",
"action",
"origin",
"transient",
"name",
")",
";",
"assert",
"that",
"(",
"origin",
",",
"is",
"(",
"origin",
"name",
")",
")",
";",
"/",
"/",
"check",
"that",
"headers",
"are",
"not",
"set",
"map",
"<",
"string",
",",
"string",
">",
"headers",
"=",
"client",
"thread",
"pool",
"(",
")",
"get",
"thread",
"context",
"(",
")",
"get",
"headers",
"(",
")",
";",
"assert",
"that",
"(",
"headers",
",",
"not",
"(",
"has",
"entry",
"(",
"authentication",
"field",
"authentication",
"key",
",",
"\"",
"anything",
"\"",
")",
")",
")",
";",
"assert",
"that",
"(",
"headers",
",",
"not",
"(",
"has",
"entry",
"(",
"authentication",
"service",
"field",
"run",
"as",
"user",
"header",
",",
"\"",
"anything",
"\"",
")",
")",
")",
";",
"return",
"client",
"search",
"(",
"new",
"search",
"request",
"(",
")",
")",
"action",
"get",
"(",
")",
";",
"}",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"t",
"remove",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"size",
"=",
"=",
"0",
")",
"{",
"return",
"null",
";",
"}",
"final",
"t",
"old",
"=",
"element",
"data",
"[",
"index",
"]",
";",
"final",
"int",
"num",
"moved",
"=",
"size",
"-",
"index",
"-",
"1",
";",
"if",
"(",
"num",
"moved",
">",
"0",
")",
"{",
"system",
"arraycopy",
"(",
"element",
"data",
",",
"index",
"+",
"1",
",",
"element",
"data",
",",
"index",
",",
"num",
"moved",
")",
";",
"}",
"element",
"data",
"[",
"-",
"-",
"size",
"]",
"=",
"null",
";",
"return",
"old",
";",
"}"
]
|
[
"shortcut",
"for",
"{",
"@",
"code",
"new",
"hasher",
"(",
")",
"put",
"bytes",
"(",
"input",
",",
"off",
",",
"len",
")",
"hash",
"(",
")",
"}",
"the",
"implementation",
"might",
"perform",
"better",
"than",
"its",
"longhand",
"equivalent",
",",
"but",
"should",
"not",
"perform",
"worse"
]
| [
"hash",
"code",
"hash",
"bytes",
"(",
"byte",
"[",
"]",
"input",
",",
"int",
"off",
",",
"int",
"len",
")",
";"
]
|
[
"sorts",
"the",
"elements",
"of",
"{",
"@",
"code",
"array",
"}",
"in",
"descending",
"order"
]
| [
"public",
"static",
"void",
"sort",
"descending",
"(",
"int",
"[",
"]",
"array",
")",
"{",
"check",
"not",
"null",
"(",
"array",
")",
";",
"sort",
"descending",
"(",
"array",
",",
"0",
",",
"array",
"length",
")",
";",
"}"
]
|
[
"enable",
"dragging",
"vertically",
",",
"up",
"and",
"down"
]
| [
"public",
"drag",
"builder",
"3",
"for",
"vertical",
"list",
"(",
")",
"{",
"return",
"with",
"directions",
"(",
"item",
"touch",
"helper",
"up",
"|",
"item",
"touch",
"helper",
"down",
")",
";",
"}"
]
|
[
"applies",
"a",
"touch",
"moved",
"event",
"to",
"the",
"stage",
"and",
"returns",
"true",
"if",
"an",
"actor",
"in",
"the",
"scene",
"{",
"@",
"link",
"event",
"#",
"handle",
"(",
")",
"handled",
"}",
"the",
"event",
"only",
"{",
"@",
"link",
"input",
"listener",
"listeners",
"}",
"that",
"returned",
"true",
"for",
"touch",
"down",
"will",
"receive",
"this",
"event"
]
| [
"public",
"boolean",
"touch",
"dragged",
"(",
"int",
"screen",
"x",
",",
"int",
"screen",
"y",
",",
"int",
"pointer",
")",
"{",
"pointer",
"screen",
"x",
"[",
"pointer",
"]",
"=",
"screen",
"x",
";",
"pointer",
"screen",
"y",
"[",
"pointer",
"]",
"=",
"screen",
"y",
";",
"mouse",
"screen",
"x",
"=",
"screen",
"x",
";",
"mouse",
"screen",
"y",
"=",
"screen",
"y",
";",
"if",
"(",
"touch",
"focuses",
"size",
"=",
"=",
"0",
")",
"return",
"false",
";",
"screen",
"to",
"stage",
"coordinates",
"(",
"temp",
"coords",
"set",
"(",
"screen",
"x",
",",
"screen",
"y",
")",
")",
";",
"input",
"event",
"event",
"=",
"pools",
"obtain",
"(",
"input",
"event",
"class",
")",
";",
"event",
"set",
"type",
"(",
"type",
"touch",
"dragged",
")",
";",
"event",
"set",
"stage",
"(",
"this",
")",
";",
"event",
"set",
"stage",
"x",
"(",
"temp",
"coords",
"x",
")",
";",
"event",
"set",
"stage",
"y",
"(",
"temp",
"coords",
"y",
")",
";",
"event",
"set",
"pointer",
"(",
"pointer",
")",
";",
"snapshot",
"array",
"<",
"touch",
"focus",
">",
"touch",
"focuses",
"=",
"this",
"touch",
"focuses",
";",
"touch",
"focus",
"[",
"]",
"focuses",
"=",
"touch",
"focuses",
"begin",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"n",
"=",
"touch",
"focuses",
"size",
";",
"i",
"<",
"n",
";",
"i",
"+",
"+",
")",
"{",
"touch",
"focus",
"focus",
"=",
"focuses",
"[",
"i",
"]",
";",
"if",
"(",
"focus",
"pointer",
"!",
"=",
"pointer",
")",
"continue",
";",
"if",
"(",
"!",
"touch",
"focuses",
"contains",
"(",
"focus",
",",
"true",
")",
")",
"continue",
";",
"/",
"/",
"touch",
"focus",
"already",
"gone",
"event",
"set",
"target",
"(",
"focus",
"target",
")",
";",
"event",
"set",
"listener",
"actor",
"(",
"focus",
"listener",
"actor",
")",
";",
"if",
"(",
"focus",
"listener",
"handle",
"(",
"event",
")",
")",
"event",
"handle",
"(",
")",
";",
"}",
"touch",
"focuses",
"end",
"(",
")",
";",
"boolean",
"handled",
"=",
"event",
"is",
"handled",
"(",
")",
";",
"pools",
"free",
"(",
"event",
")",
";",
"return",
"handled",
";",
"}"
]
|
[
"this",
"is",
"the",
"function",
"invoked",
"to",
"handle",
"each",
"element"
]
| [
"public",
"void",
"invoke",
"(",
"kafka",
"transaction",
"state",
"transaction",
",",
"in",
"next",
",",
"context",
"context",
")",
"throws",
"flink",
"kafka",
"exception",
"{",
"check",
"erroneous",
"(",
")",
";",
"/",
"/",
"write",
"timestamp",
"to",
"kafka",
"if",
"timestamp",
"is",
"available",
"long",
"timestamp",
"=",
"context",
"timestamp",
"(",
")",
";",
"int",
"[",
"]",
"partitions",
"=",
"get",
"partitions",
"(",
"transaction",
")",
";",
"int",
"partition",
"index",
";",
"try",
"{",
"partition",
"index",
"=",
"key",
"group",
"range",
"assignment",
"assign",
"key",
"to",
"parallel",
"operator",
"(",
"key",
"selector",
"get",
"key",
"(",
"next",
")",
",",
"partitions",
"length",
",",
"partitions",
"length",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"\"",
"fail",
"to",
"assign",
"a",
"partition",
"number",
"to",
"record",
"\"",
",",
"e",
")",
";",
"}",
"producer",
"record",
"<",
"byte",
"[",
"]",
",",
"byte",
"[",
"]",
">",
"record",
"=",
"new",
"producer",
"record",
"<",
">",
"(",
"default",
"topic",
"id",
",",
"partition",
"index",
",",
"timestamp",
",",
"null",
",",
"kafka",
"serializer",
"serialize",
"record",
"(",
"next",
",",
"timestamp",
")",
")",
";",
"pending",
"records",
"increment",
"and",
"get",
"(",
")",
";",
"transaction",
"get",
"producer",
"(",
")",
"send",
"(",
"record",
",",
"callback",
")",
";",
"}"
]
|
[
"returns",
"the",
"value",
"used",
"in",
"this",
"query"
]
| [
"public",
"string",
"value",
"(",
")",
"{",
"return",
"this",
"value",
";",
"}"
]
|
[
"checks",
",",
"if",
"this",
"enum",
"constant",
"represents",
"in",
"fact",
"an",
"order",
"that",
"is",
",",
"whether",
"this",
"property",
"is",
"not",
"equal",
"to",
"<",
"tt",
">",
"order",
"none",
"<",
"tt",
">"
]
| [
"public",
"boolean",
"is",
"ordered",
"(",
")",
"{",
"return",
"this",
"!",
"=",
"order",
"none",
";",
"}"
]
|
[
"sets",
"all",
"deprecated",
"properties",
"that",
"are",
"not",
"currently",
"set",
"but",
"have",
"a",
"corresponding",
"new",
"property",
"that",
"is",
"set",
"useful",
"for",
"iterating",
"the",
"properties",
"when",
"all",
"deprecated",
"properties",
"for",
"currently",
"set",
"properties",
"need",
"to",
"be",
"present"
]
| [
"public",
"void",
"set",
"deprecated",
"properties",
"(",
")",
"{",
"deprecation",
"context",
"deprecations",
"=",
"deprecation",
"context",
"get",
"(",
")",
";",
"properties",
"props",
"=",
"get",
"props",
"(",
")",
";",
"properties",
"overlay",
"=",
"get",
"overlay",
"(",
")",
";",
"for",
"(",
"entry",
"<",
"string",
",",
"deprecated",
"key",
"info",
">",
"entry",
":",
"deprecations",
"get",
"deprecated",
"key",
"map",
"(",
")",
"entry",
"set",
"(",
")",
")",
"{",
"string",
"dep",
"key",
"=",
"entry",
"get",
"key",
"(",
")",
";",
"if",
"(",
"!",
"overlay",
"contains",
"(",
"dep",
"key",
")",
")",
"{",
"for",
"(",
"string",
"new",
"key",
":",
"entry",
"get",
"value",
"(",
")",
"new",
"keys",
")",
"{",
"string",
"val",
"=",
"overlay",
"get",
"property",
"(",
"new",
"key",
")",
";",
"if",
"(",
"val",
"!",
"=",
"null",
")",
"{",
"props",
"set",
"property",
"(",
"dep",
"key",
",",
"val",
")",
";",
"overlay",
"set",
"property",
"(",
"dep",
"key",
",",
"val",
")",
";",
"break",
";",
"}",
"}",
"}",
"}",
"}"
]
|
[
"returns",
"a",
"future",
"completing",
"to",
"the",
"archived",
"execution",
"graph",
"of",
"the",
"job"
]
| [
"public",
"completable",
"future",
"<",
"archived",
"execution",
"graph",
">",
"request",
"job",
"(",
"time",
"timeout",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"is",
"initialized",
"(",
")",
")",
"{",
"if",
"(",
"job",
"result",
"future",
"is",
"done",
"(",
")",
")",
"{",
"/",
"/",
"job",
"is",
"not",
"running",
"anymore",
"return",
"job",
"result",
"future",
"then",
"apply",
"(",
"dispatcher",
"job",
"result",
":",
":",
"get",
"archived",
"execution",
"graph",
")",
";",
"}",
"/",
"/",
"job",
"is",
"still",
"running",
"return",
"get",
"job",
"master",
"gateway",
"(",
")",
"then",
"compose",
"(",
"job",
"master",
"gateway",
"-",
">",
"job",
"master",
"gateway",
"request",
"job",
"(",
"timeout",
")",
")",
";",
"}",
"else",
"{",
"preconditions",
"check",
"state",
"(",
"this",
"job",
"status",
"=",
"=",
"dispatcher",
"job",
"status",
"initializing",
"|",
"|",
"job",
"status",
"=",
"=",
"dispatcher",
"job",
"status",
"cancelling",
")",
";",
"return",
"completable",
"future",
"completed",
"future",
"(",
"archived",
"execution",
"graph",
"create",
"from",
"initializing",
"job",
"(",
"job",
"id",
",",
"job",
"name",
",",
"job",
"status",
"as",
"job",
"status",
"(",
")",
",",
"null",
",",
"initialization",
"timestamp",
")",
")",
";",
"}",
"}",
"}"
]
|
[
"handle",
"expected",
"exceptions",
"through",
"logging",
"andor",
"other",
"actions"
]
| [
"protected",
"void",
"handle",
"expected",
"exception",
"(",
"exception",
"e",
")",
"{",
"get",
"logger",
"(",
")",
"debug",
"(",
"\"",
"expected",
":",
"{",
"}",
"\"",
",",
"e",
",",
"e",
")",
";",
"}"
]
|
[
"tests",
"that",
"when",
"one",
"node",
"returns",
"a",
"shard",
"lock",
"obtain",
"failed",
"exception",
"and",
"another",
"properly",
"loads",
"the",
"store",
",",
"it",
"will",
"select",
"the",
"second",
"node",
"as",
"target"
]
| [
"public",
"void",
"test",
"shard",
"lock",
"obtain",
"failed",
"exception",
"prefer",
"other",
"valid",
"copies",
"(",
")",
"{",
"string",
"alloc",
"id",
"1",
"=",
"random",
"alpha",
"of",
"length",
"(",
"10",
")",
";",
"string",
"alloc",
"id",
"2",
"=",
"random",
"alpha",
"of",
"length",
"(",
"10",
")",
";",
"final",
"routing",
"allocation",
"allocation",
"=",
"routing",
"allocation",
"with",
"one",
"primary",
"no",
"replicas",
"(",
"yes",
"allocation",
"deciders",
"(",
")",
",",
"cluster",
"recovered",
",",
"alloc",
"id",
"1",
",",
"alloc",
"id",
"2",
")",
";",
"test",
"allocator",
"add",
"data",
"(",
"node",
"1",
",",
"alloc",
"id",
"1",
",",
"random",
"boolean",
"(",
")",
",",
"new",
"shard",
"lock",
"obtain",
"failed",
"exception",
"(",
"shard",
"id",
",",
"\"",
"test",
"\"",
")",
")",
";",
"test",
"allocator",
"add",
"data",
"(",
"node",
"2",
",",
"alloc",
"id",
"2",
",",
"random",
"boolean",
"(",
")",
",",
"null",
")",
";",
"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",
"2",
"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",
"2",
")",
")",
";",
"assert",
"cluster",
"health",
"status",
"(",
"allocation",
",",
"cluster",
"health",
"status",
"yellow",
")",
";",
"}"
]
|
[
"finds",
"annotations",
"either",
"by",
"offset",
"or",
"by",
"line",
"number"
]
| [
"private",
"void",
"find",
"annotations",
"(",
"int",
"offset",
",",
"i",
"annotation",
"model",
"model",
",",
"i",
"document",
"document",
",",
"int",
"line",
"number",
")",
"{",
"annotations",
"clear",
"(",
")",
";",
"if",
"(",
"model",
"=",
"=",
"null",
")",
"{",
"if",
"(",
"editor",
"!",
"=",
"null",
")",
"{",
"i",
"text",
"editor",
"editor",
"=",
"this",
"editor",
";",
"model",
"=",
"editor",
"get",
"document",
"provider",
"(",
")",
"get",
"annotation",
"model",
"(",
"editor",
"get",
"editor",
"input",
"(",
")",
")",
";",
"}",
"}",
"if",
"(",
"model",
"=",
"=",
"null",
")",
"{",
"return",
";",
"}",
"for",
"(",
"iterator",
"<",
"?",
">",
"it",
"=",
"model",
"get",
"annotation",
"iterator",
"(",
")",
";",
"it",
"has",
"next",
"(",
")",
";",
")",
"{",
"annotation",
"annotation",
"=",
"(",
"annotation",
")",
"it",
"next",
"(",
")",
";",
"position",
"position",
"=",
"model",
"get",
"position",
"(",
"annotation",
")",
";",
"/",
"/",
"if",
"position",
"is",
"null",
",",
"just",
"return",
"if",
"(",
"position",
"=",
"=",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"if",
"(",
"position",
"overlaps",
"with",
"(",
"offset",
",",
"1",
")",
"|",
"|",
"document",
"!",
"=",
"null",
"&",
"&",
"document",
"get",
"line",
"of",
"offset",
"(",
"position",
"offset",
")",
"=",
"=",
"line",
"number",
")",
"{",
"annotations",
"add",
"(",
"annotation",
")",
";",
"}",
"}",
"catch",
"(",
"bad",
"location",
"exception",
"e",
")",
"{",
"log",
"error",
"(",
"e",
")",
";",
"}",
"}",
"}",
"/",
"*",
"private",
"string",
"get",
"hover",
"info",
"(",
")",
"{",
"string",
"text",
"=",
"null",
";",
"i",
"preference",
"store",
"store",
"=",
"d",
"b",
"workbench",
"get",
"platform",
"(",
")",
"get",
"preference",
"store",
"(",
")",
";",
"for",
"(",
"annotation",
"annotation",
":",
"annotations",
")",
"{",
"if",
"(",
"annotation",
"instanceof",
"marker",
"annotation",
")",
"{",
"try",
"{",
"i",
"marker",
"marker",
"=",
"(",
"(",
"marker",
"annotation",
")",
"annotation",
")",
"get",
"marker",
"(",
")",
";",
"if",
"(",
"marker",
"get",
"type",
"(",
")",
"equals",
"(",
"s",
"q",
"l",
"constants",
"syntax",
"marker",
"type",
")",
"|",
"|",
"marker",
"get",
"type",
"(",
")",
"equals",
"(",
"s",
"q",
"l",
"constants",
"portability",
"marker",
"type",
")",
")",
"{",
"if",
"(",
"store",
"get",
"boolean",
"(",
"s",
"q",
"l",
"preference",
"constants",
"show",
"syntax",
"error",
"detail",
")",
")",
"{",
"text",
"=",
"(",
"string",
")",
"marker",
"get",
"binding",
"(",
"i",
"marker",
"message",
")",
";",
"}",
"else",
"{",
"text",
"=",
"(",
"string",
")",
"marker",
"get",
"binding",
"(",
"s",
"q",
"l",
"constants",
"short",
"message",
")",
";",
"}",
"/",
"/",
"todo",
":",
"consider",
"combine",
"multiple",
"annotations",
"break",
";",
"}",
"}",
"catch",
"(",
"core",
"exception",
"e",
")",
"{",
"log",
"error",
"(",
"e",
")",
";",
"}",
"}",
"}",
"annotations",
"clear",
"(",
")",
";",
"return",
"text",
";",
"}"
]
|
[
"rolling",
"count",
"of",
"number",
"of",
"threads",
"executed",
"during",
"rolling",
"statistical",
"window",
"the",
"rolling",
"window",
"is",
"defined",
"by",
"{",
"@",
"link",
"hystrix",
"thread",
"pool",
"properties",
"#",
"metrics",
"rolling",
"statistical",
"window",
"in",
"milliseconds",
"(",
")",
"}"
]
| [
"public",
"long",
"get",
"rolling",
"count",
"threads",
"executed",
"(",
")",
"{",
"return",
"rolling",
"counter",
"stream",
"get",
"latest",
"count",
"(",
"hystrix",
"event",
"type",
"thread",
"pool",
"executed",
")",
";",
"}"
]
|
[
"this",
"is",
"a",
"wrapper",
"method",
"to",
"expose",
"this",
"protected",
"method",
"to",
"{",
"@",
"link",
"geo",
"shape",
"cell",
"id",
"source",
"}"
]
| [
"public",
"long",
"add",
"request",
"bytes",
"(",
"long",
"bytes",
")",
"{",
"return",
"add",
"request",
"circuit",
"breaker",
"bytes",
"(",
"bytes",
")",
";",
"}"
]
|
[
"this",
"test",
"checks",
"that",
"it",
"will",
"backup",
"static",
"file",
"on",
"bootup"
]
| [
"public",
"void",
"test",
"backup",
"static",
"(",
")",
"throws",
"exception",
"{",
"final",
"int",
"server",
"count",
"=",
"3",
";",
"final",
"int",
"[",
"]",
"client",
"ports",
"=",
"new",
"int",
"[",
"server",
"count",
"]",
";",
"string",
"builder",
"sb",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"string",
"server",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"server",
"count",
";",
"i",
"+",
"+",
")",
"{",
"client",
"ports",
"[",
"i",
"]",
"=",
"port",
"assignment",
"unique",
"(",
")",
";",
"server",
"=",
"\"",
"server",
"\"",
"+",
"i",
"+",
"\"",
"=",
"localhost",
":",
"\"",
"+",
"port",
"assignment",
"unique",
"(",
")",
"+",
"\"",
":",
"\"",
"+",
"port",
"assignment",
"unique",
"(",
")",
"+",
"\"",
":",
"participant",
";",
"localhost",
":",
"\"",
"+",
"client",
"ports",
"[",
"i",
"]",
";",
"sb",
"append",
"(",
"server",
"+",
"\"",
"\\",
"n",
"\"",
")",
";",
"}",
"string",
"current",
"quorum",
"cfg",
"section",
"=",
"sb",
"to",
"string",
"(",
")",
";",
"main",
"thread",
"[",
"]",
"mt",
"=",
"new",
"main",
"thread",
"[",
"server",
"count",
"]",
";",
"string",
"[",
"]",
"static",
"file",
"content",
"=",
"new",
"string",
"[",
"server",
"count",
"]",
";",
"string",
"[",
"]",
"static",
"backup",
"content",
"=",
"new",
"string",
"[",
"server",
"count",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"server",
"count",
";",
"i",
"+",
"+",
")",
"{",
"mt",
"[",
"i",
"]",
"=",
"new",
"main",
"thread",
"(",
"i",
",",
"client",
"ports",
"[",
"i",
"]",
",",
"current",
"quorum",
"cfg",
"section",
",",
"false",
")",
";",
"/",
"/",
"check",
"that",
"a",
"dynamic",
"configuration",
"file",
"doesn",
"'",
"t",
"exist",
"assert",
"null",
"(",
"mt",
"[",
"i",
"]",
"get",
"file",
"by",
"name",
"(",
"\"",
"zoo",
"cfg",
"bak",
"\"",
")",
",",
"\"",
"static",
"file",
"backup",
"shouldn",
"'",
"t",
"exist",
"before",
"bootup",
"\"",
")",
";",
"static",
"file",
"content",
"[",
"i",
"]",
"=",
"new",
"string",
"(",
"files",
"read",
"all",
"bytes",
"(",
"mt",
"[",
"i",
"]",
"conf",
"file",
"to",
"path",
"(",
")",
")",
",",
"utf",
"8",
")",
";",
"mt",
"[",
"i",
"]",
"start",
"(",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"server",
"count",
";",
"i",
"+",
"+",
")",
"{",
"assert",
"true",
"(",
"client",
"base",
"wait",
"for",
"server",
"up",
"(",
"\"",
"127",
"0",
"0",
"1",
":",
"\"",
"+",
"client",
"ports",
"[",
"i",
"]",
",",
"connection",
"timeout",
")",
",",
"\"",
"waiting",
"for",
"server",
"\"",
"+",
"i",
"+",
"\"",
"being",
"up",
"\"",
")",
";",
"file",
"backup",
"file",
"=",
"mt",
"[",
"i",
"]",
"get",
"file",
"by",
"name",
"(",
"\"",
"zoo",
"cfg",
"bak",
"\"",
")",
";",
"assert",
"not",
"null",
"(",
"backup",
"file",
",",
"\"",
"static",
"file",
"backup",
"should",
"exist",
"\"",
")",
";",
"static",
"backup",
"content",
"[",
"i",
"]",
"=",
"new",
"string",
"(",
"files",
"read",
"all",
"bytes",
"(",
"backup",
"file",
"to",
"path",
"(",
")",
")",
",",
"utf",
"8",
")",
";",
"assert",
"equals",
"(",
"static",
"file",
"content",
"[",
"i",
"]",
",",
"static",
"backup",
"content",
"[",
"i",
"]",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"server",
"count",
";",
"i",
"+",
"+",
")",
"{",
"mt",
"[",
"i",
"]",
"shutdown",
"(",
")",
";",
"}",
"}"
]
|
[
"generate",
"a",
"modified",
"version",
"of",
"the",
"supplied",
"locations",
"array",
"and",
"return",
"it",
"the",
"default",
"implementation",
"simply",
"delegates",
"to",
"{",
"@",
"link",
"test",
"context",
"resource",
"utils",
"#",
"convert",
"to",
"classpath",
"resource",
"paths",
"}",
"subclasses",
"can",
"override",
"this",
"method",
"to",
"implement",
"a",
"different",
"location",
"modification",
"strategy"
]
| [
"protected",
"string",
"[",
"]",
"modify",
"locations",
"(",
"class",
"<",
"?",
">",
"clazz",
",",
"string",
"locations",
")",
"{",
"return",
"test",
"context",
"resource",
"utils",
"convert",
"to",
"classpath",
"resource",
"paths",
"(",
"clazz",
",",
"locations",
")",
";",
"}"
]
|
[
"sets",
"the",
"size",
"of",
"the",
"text",
"field",
"editor",
"used",
"by",
"this",
"combo",
"box",
",",
"<",
"b",
">",
"if",
"that",
"is",
"the",
"type",
"of",
"editor",
"used",
"<",
"b",
">",
"by",
"default",
"the",
"editor",
"for",
"combo",
"boxes",
"is",
"a",
"text",
"field",
"this",
"method",
"is",
"a",
"convenience",
"for",
"the",
"user",
"to",
"set",
"the",
"number",
"of",
"columns",
"on",
"that",
"text",
"field",
",",
"which",
"updates",
"the",
"preferred",
"size",
"of",
"the",
"combo",
"box"
]
| [
"public",
"void",
"set",
"column",
"count",
"(",
"int",
"column",
"count",
")",
"{",
"component",
"comp",
"=",
"get",
"editor",
"(",
")",
"get",
"editor",
"component",
"(",
")",
";",
"if",
"(",
"comp",
"instanceof",
"j",
"text",
"field",
")",
"{",
"(",
"(",
"j",
"text",
"field",
")",
"comp",
")",
"set",
"columns",
"(",
"column",
"count",
")",
";",
"}",
"}"
]
|
[
"try",
"to",
"process",
"any",
"messages",
"that",
"were",
"previously",
"queued",
"for",
"the",
"given",
"block",
"this",
"is",
"called",
"from",
"f",
"s",
"edit",
"log",
"loader",
"whenever",
"a",
"block",
"'",
"s",
"state",
"in",
"the",
"namespace",
"has",
"changed",
"or",
"a",
"new",
"block",
"has",
"been",
"created"
]
| [
"public",
"void",
"process",
"queued",
"messages",
"for",
"block",
"(",
"block",
"b",
")",
"throws",
"i",
"o",
"exception",
"{",
"queue",
"<",
"reported",
"block",
"info",
">",
"queue",
"=",
"pending",
"d",
"n",
"messages",
"take",
"block",
"queue",
"(",
"b",
")",
";",
"if",
"(",
"queue",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"nothing",
"to",
"re",
"-",
"process",
"return",
";",
"}",
"process",
"queued",
"messages",
"(",
"queue",
")",
";",
"}"
]
|
[
"test",
"sps",
"for",
"empty",
"directory",
",",
"x",
"attr",
"should",
"be",
"removed"
]
| [
"public",
"void",
"test",
"s",
"p",
"s",
"for",
"empty",
"directory",
"(",
")",
"throws",
"i",
"o",
"exception",
",",
"timeout",
"exception",
",",
"interrupted",
"exception",
"{",
"try",
"{",
"hdfs",
"cluster",
"=",
"start",
"cluster",
"(",
"config",
",",
"all",
"disk",
"types",
",",
"num",
"of",
"datanodes",
",",
"storages",
"per",
"datanode",
",",
"capacity",
")",
";",
"hdfs",
"cluster",
"wait",
"active",
"(",
")",
";",
"distributed",
"file",
"system",
"fs",
"=",
"hdfs",
"cluster",
"get",
"file",
"system",
"(",
")",
";",
"path",
"empty",
"dir",
"=",
"new",
"path",
"(",
"\"",
"/",
"empty",
"dir",
"\"",
")",
";",
"fs",
"mkdirs",
"(",
"empty",
"dir",
")",
";",
"fs",
"satisfy",
"storage",
"policy",
"(",
"empty",
"dir",
")",
";",
"/",
"/",
"make",
"sure",
"satisfy",
"xattr",
"has",
"been",
"removed",
"d",
"f",
"s",
"test",
"util",
"wait",
"for",
"xattr",
"removed",
"(",
"\"",
"/",
"empty",
"dir",
"\"",
",",
"xattr",
"satisfy",
"storage",
"policy",
",",
"hdfs",
"cluster",
"get",
"namesystem",
"(",
")",
",",
"30000",
")",
";",
"}",
"finally",
"{",
"shutdown",
"cluster",
"(",
")",
";",
"}",
"}"
]
|
[
"configure",
"the",
"registry",
"for",
"reactive",
"type",
"support",
"this",
"can",
"be",
"used",
"to",
"to",
"adapt",
"to",
",",
"andor",
"determine",
"the",
"semantics",
"of",
"a",
"given",
"{",
"@",
"link",
"org",
"reactivestreams",
"publisher",
"publisher",
"}",
"by",
"default",
"this",
"{",
"@",
"link",
"reactive",
"adapter",
"registry",
"#",
"get",
"shared",
"instance",
"(",
")",
"}"
]
| [
"builder",
"reactive",
"adapter",
"strategy",
"(",
"@",
"nullable",
"reactive",
"adapter",
"registry",
"registry",
")",
";"
]
|
[
"removes",
"the",
"progress",
"bar",
"from",
"being",
"displayed",
"by",
"this",
"panel",
"setting",
"progress",
"will",
"cause",
"it",
"to",
"get",
"added",
"again"
]
| [
"public",
"void",
"remove",
"progress",
"(",
")",
"{",
"remove",
"(",
"progress",
"bar",
")",
";",
"if",
"(",
"is",
"showing",
"message",
")",
"{",
"progress",
"layout",
"put",
"constraint",
"(",
"spring",
"layout",
"north",
",",
"message",
"icon",
",",
"5",
",",
"spring",
"layout",
"south",
",",
"title",
"label",
")",
";",
"}",
"is",
"showing",
"progress",
"=",
"false",
";",
"do",
"validate",
"(",
")",
";",
"}",
"/",
"/"
]
|
[
"creates",
"a",
"{",
"@",
"link",
"boolean",
"query",
"}",
"to",
"be",
"used",
"as",
"filter",
"to",
"restrict",
"access",
"to",
"documents",
"<",
"br",
">",
"document",
"permission",
"queries",
"are",
"used",
"to",
"create",
"an",
"boolean",
"query",
"<",
"br",
">",
"if",
"the",
"document",
"permissions",
"are",
"limited",
",",
"then",
"there",
"is",
"an",
"additional",
"filter",
"added",
"restricting",
"access",
"to",
"documents",
"only",
"allowed",
"by",
"the",
"limited",
"queries"
]
| [
"public",
"boolean",
"query",
"filter",
"(",
"user",
"user",
",",
"script",
"service",
"script",
"service",
",",
"shard",
"id",
"shard",
"id",
",",
"function",
"<",
"shard",
"id",
",",
"query",
"shard",
"context",
">",
"query",
"shard",
"context",
"provider",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"has",
"document",
"level",
"permissions",
"(",
")",
")",
"{",
"boolean",
"query",
"builder",
"filter",
";",
"if",
"(",
"queries",
"!",
"=",
"null",
"&",
"&",
"limited",
"by",
"queries",
"!",
"=",
"null",
")",
"{",
"filter",
"=",
"new",
"boolean",
"query",
"builder",
"(",
")",
";",
"boolean",
"query",
"builder",
"scoped",
"filter",
"=",
"new",
"boolean",
"query",
"builder",
"(",
")",
";",
"build",
"role",
"query",
"(",
"user",
",",
"script",
"service",
",",
"shard",
"id",
",",
"query",
"shard",
"context",
"provider",
",",
"limited",
"by",
"queries",
",",
"scoped",
"filter",
")",
";",
"filter",
"add",
"(",
"scoped",
"filter",
"build",
"(",
")",
",",
"filter",
")",
";",
"build",
"role",
"query",
"(",
"user",
",",
"script",
"service",
",",
"shard",
"id",
",",
"query",
"shard",
"context",
"provider",
",",
"queries",
",",
"filter",
")",
";",
"}",
"else",
"if",
"(",
"queries",
"!",
"=",
"null",
")",
"{",
"filter",
"=",
"new",
"boolean",
"query",
"builder",
"(",
")",
";",
"build",
"role",
"query",
"(",
"user",
",",
"script",
"service",
",",
"shard",
"id",
",",
"query",
"shard",
"context",
"provider",
",",
"queries",
",",
"filter",
")",
";",
"}",
"else",
"if",
"(",
"limited",
"by",
"queries",
"!",
"=",
"null",
")",
"{",
"filter",
"=",
"new",
"boolean",
"query",
"builder",
"(",
")",
";",
"build",
"role",
"query",
"(",
"user",
",",
"script",
"service",
",",
"shard",
"id",
",",
"query",
"shard",
"context",
"provider",
",",
"limited",
"by",
"queries",
",",
"filter",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"return",
"filter",
"build",
"(",
")",
";",
"}",
"return",
"null",
";",
"}"
]
|
[
"handles",
"change",
"in",
"name",
"when",
"committing",
"a",
"direct",
"edit"
]
| [
"protected",
"void",
"commit",
"name",
"change",
"(",
"property",
"change",
"event",
"evt",
")",
"{",
"entity",
"figure",
"entity",
"figure",
"=",
"get",
"figure",
"(",
")",
";",
"editable",
"label",
"label",
"=",
"entity",
"figure",
"get",
"name",
"label",
"(",
")",
";",
"label",
"set",
"text",
"(",
"get",
"entity",
"(",
")",
"get",
"object",
"(",
")",
"get",
"name",
"(",
")",
")",
";",
"label",
"set",
"visible",
"(",
"true",
")",
";",
"refresh",
"visuals",
"(",
")",
";",
"entity",
"figure",
"refresh",
"colors",
"(",
")",
";",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.