docstring_tokens
list | code_tokens
list |
---|---|
[
"returns",
"the",
"item",
"that",
"was",
"processed"
] | [
"public",
"i",
"get",
"item",
"(",
")",
"{",
"return",
"item",
";",
"}"
] |
[
"called",
"when",
"the",
"animation",
"backend",
"has",
"not",
"been",
"used",
"to",
"draw",
"frames",
"within",
"the",
"given",
"threshold"
] | [
"void",
"on",
"inactive",
"(",
")",
";"
] |
[
"split",
"an",
"sql",
"script",
"into",
"separate",
"statements",
"delimited",
"by",
"the",
"provided",
"separator",
"string",
"each",
"individual",
"statement",
"will",
"be",
"added",
"to",
"the",
"provided",
"{",
"@",
"code",
"list",
"}",
"within",
"the",
"script",
",",
"the",
"provided",
"{",
"@",
"code",
"comment",
"prefix",
"}",
"will",
"be",
"honored",
":",
"any",
"text",
"beginning",
"with",
"the",
"comment",
"prefix",
"and",
"extending",
"to",
"the",
"end",
"of",
"the",
"line",
"will",
"be",
"omitted",
"from",
"the",
"output",
"similarly",
",",
"the",
"provided",
"{",
"@",
"code",
"block",
"comment",
"start",
"delimiter",
"}",
"and",
"{",
"@",
"code",
"block",
"comment",
"end",
"delimiter",
"}",
"delimiters",
"will",
"be",
"honored",
":",
"any",
"text",
"enclosed",
"in",
"a",
"block",
"comment",
"will",
"be",
"omitted",
"from",
"the",
"output",
"in",
"addition",
",",
"multiple",
"adjacent",
"whitespace",
"characters",
"will",
"be",
"collapsed",
"into",
"a",
"single",
"space"
] | [
"public",
"static",
"void",
"split",
"sql",
"script",
"(",
"@",
"nullable",
"encoded",
"resource",
"resource",
",",
"string",
"script",
",",
"string",
"separator",
",",
"string",
"comment",
"prefix",
",",
"string",
"block",
"comment",
"start",
"delimiter",
",",
"string",
"block",
"comment",
"end",
"delimiter",
",",
"list",
"<",
"string",
">",
"statements",
")",
"throws",
"script",
"exception",
"{",
"assert",
"has",
"text",
"(",
"comment",
"prefix",
",",
"\"",
"'",
"comment",
"prefix",
"'",
"must",
"not",
"be",
"null",
"or",
"empty",
"\"",
")",
";",
"split",
"sql",
"script",
"(",
"resource",
",",
"script",
",",
"separator",
",",
"new",
"string",
"[",
"]",
"{",
"comment",
"prefix",
"}",
",",
"block",
"comment",
"start",
"delimiter",
",",
"block",
"comment",
"end",
"delimiter",
",",
"statements",
")",
";",
"}"
] |
[
"get",
"$",
"special",
"property",
"name"
] | [
"public",
"long",
"get",
"$",
"special",
"property",
"name",
"(",
")",
"{",
"return",
"$",
"special",
"property",
"name",
";",
"}"
] |
[
"set",
"whether",
"it",
"should",
"be",
"allowed",
"to",
"override",
"bean",
"definitions",
"by",
"registering",
"a",
"different",
"definition",
"with",
"the",
"same",
"name",
",",
"automatically",
"replacing",
"the",
"former",
"if",
"not",
",",
"an",
"exception",
"will",
"be",
"thrown",
"this",
"also",
"applies",
"to",
"overriding",
"aliases",
"default",
"is",
"\"",
"true",
"\""
] | [
"public",
"void",
"set",
"allow",
"bean",
"definition",
"overriding",
"(",
"boolean",
"allow",
"bean",
"definition",
"overriding",
")",
"{",
"this",
"allow",
"bean",
"definition",
"overriding",
"=",
"allow",
"bean",
"definition",
"overriding",
";",
"}"
] |
[
"runs",
"a",
"zoo",
"keeper",
"{",
"@",
"link",
"quorum",
"peer",
"}",
"if",
"further",
"peers",
"are",
"configured",
"or",
"a",
"single",
"{",
"@",
"link",
"zoo",
"keeper",
"server",
"}",
"if",
"no",
"further",
"peers",
"are",
"configured"
] | [
"public",
"static",
"void",
"run",
"flink",
"zk",
"quorum",
"peer",
"(",
"string",
"zk",
"config",
"file",
",",
"int",
"peer",
"id",
")",
"throws",
"exception",
"{",
"properties",
"zk",
"props",
"=",
"new",
"properties",
"(",
")",
";",
"try",
"(",
"input",
"stream",
"in",
"stream",
"=",
"new",
"file",
"input",
"stream",
"(",
"new",
"file",
"(",
"zk",
"config",
"file",
")",
")",
")",
"{",
"zk",
"props",
"load",
"(",
"in",
"stream",
")",
";",
"}",
"log",
"info",
"(",
"\"",
"configuration",
":",
"\"",
"+",
"zk",
"props",
")",
";",
"/",
"/",
"set",
"defaults",
"for",
"required",
"properties",
"set",
"required",
"properties",
"(",
"zk",
"props",
")",
";",
"/",
"/",
"write",
"peer",
"id",
"to",
"myid",
"file",
"write",
"my",
"id",
"to",
"data",
"dir",
"(",
"zk",
"props",
",",
"peer",
"id",
")",
";",
"/",
"/",
"the",
"myid",
"file",
"needs",
"to",
"be",
"written",
"before",
"creating",
"the",
"instance",
"otherwise",
",",
"this",
"/",
"/",
"will",
"fail",
"quorum",
"peer",
"config",
"conf",
"=",
"new",
"quorum",
"peer",
"config",
"(",
")",
";",
"conf",
"parse",
"properties",
"(",
"zk",
"props",
")",
";",
"if",
"(",
"conf",
"is",
"distributed",
"(",
")",
")",
"{",
"/",
"/",
"run",
"quorum",
"peer",
"log",
"info",
"(",
"\"",
"running",
"distributed",
"zoo",
"keeper",
"quorum",
"peer",
"(",
"total",
"peers",
":",
"{",
"}",
")",
"\"",
",",
"conf",
"get",
"servers",
"(",
")",
"size",
"(",
")",
")",
";",
"quorum",
"peer",
"main",
"qp",
"=",
"new",
"quorum",
"peer",
"main",
"(",
")",
";",
"qp",
"run",
"from",
"config",
"(",
"conf",
")",
";",
"}",
"else",
"{",
"/",
"/",
"run",
"standalone",
"log",
"info",
"(",
"\"",
"running",
"standalone",
"zoo",
"keeper",
"quorum",
"peer",
"\"",
")",
";",
"zoo",
"keeper",
"server",
"main",
"zk",
"=",
"new",
"zoo",
"keeper",
"server",
"main",
"(",
")",
";",
"server",
"config",
"sc",
"=",
"new",
"server",
"config",
"(",
")",
";",
"sc",
"read",
"from",
"(",
"conf",
")",
";",
"zk",
"run",
"from",
"config",
"(",
"sc",
")",
";",
"}",
"}"
] |
[
"extracts",
"the",
"execution",
"plan",
"(",
"as",
"json",
")",
"from",
"the",
"given",
"{",
"@",
"link",
"pipeline",
"}"
] | [
"public",
"static",
"string",
"translate",
"to",
"j",
"s",
"o",
"n",
"execution",
"plan",
"(",
"pipeline",
"pipeline",
")",
"{",
"flink",
"pipeline",
"translator",
"pipeline",
"translator",
"=",
"get",
"pipeline",
"translator",
"(",
"pipeline",
")",
";",
"return",
"pipeline",
"translator",
"translate",
"to",
"j",
"s",
"o",
"n",
"execution",
"plan",
"(",
"pipeline",
")",
";",
"}"
] |
[
"add",
"a",
"search",
"pattern",
",",
"to",
"the",
"searcher",
",",
"for",
"the",
"set",
"of",
"bytes",
"representing",
"an",
"rtti",
"4",
"location",
"only",
"one",
"v",
"f",
"table",
"for",
"is",
"allowed",
"for",
"an",
"rtt4",
"location",
",",
"last",
"one",
"in",
"wins",
"and",
"gets",
"created"
] | [
"private",
"void",
"add",
"byte",
"search",
"pattern",
"(",
"memory",
"byte",
"pattern",
"searcher",
"searcher",
",",
"hash",
"map",
"<",
"address",
",",
"vf",
"table",
"model",
">",
"found",
"v",
"ftables",
",",
"address",
"rtti",
"4",
"address",
",",
"byte",
"[",
"]",
"bytes",
")",
"{",
"if",
"(",
"bytes",
"=",
"=",
"null",
")",
"{",
"return",
";",
"}",
"generic",
"match",
"action",
"<",
"address",
">",
"action",
"=",
"new",
"generic",
"match",
"action",
"<",
"address",
">",
"(",
"rtti",
"4",
"address",
")",
"{",
"@",
"override",
"public",
"void",
"apply",
"(",
"program",
"prog",
",",
"address",
"addr",
",",
"match",
"match",
")",
"{",
"address",
"possible",
"vf",
"table",
"addr",
"=",
"addr",
"add",
"(",
"prog",
"get",
"default",
"pointer",
"size",
"(",
")",
")",
";",
"/",
"/",
"see",
"if",
"vf",
"table",
"is",
"valid",
",",
"and",
"add",
"to",
"rtti",
"4",
"to",
"vf",
"table",
"map",
"try",
"{",
"vf",
"table",
"model",
"vf",
"table",
"model",
"=",
"new",
"vf",
"table",
"model",
"(",
"prog",
",",
"possible",
"vf",
"table",
"addr",
",",
"validation",
"options",
")",
";",
"vf",
"table",
"model",
"validate",
"(",
")",
";",
"vf",
"table",
"model",
"existing",
"=",
"found",
"v",
"ftables",
"put",
"(",
"rtti",
"4",
"address",
",",
"vf",
"table",
"model",
")",
";",
"if",
"(",
"existing",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"potential",
"table",
"already",
"found",
",",
"is",
"an",
"error",
",",
"don",
"'",
"t",
"know",
"which",
"is",
"right",
"string",
"message",
"=",
"\"",
"more",
"than",
"one",
"possible",
"vf",
"table",
"found",
"for",
"\"",
"+",
"rtti",
"4",
"model",
"data",
"type",
"name",
"+",
"\"",
"@",
"\"",
"+",
"rtti",
"4",
"address",
";",
"handle",
"error",
"message",
"(",
"prog",
",",
"rtti",
"4",
"address",
",",
"message",
")",
";",
"}",
"}",
"catch",
"(",
"invalid",
"data",
"type",
"exception",
"e",
")",
"{",
"/",
"/",
"this",
"isn",
"'",
"t",
"a",
"valid",
"model",
"}",
"}",
"}",
";",
"generic",
"byte",
"sequence",
"pattern",
"<",
"address",
">",
"generic",
"byte",
"match",
"pattern",
"=",
"new",
"generic",
"byte",
"sequence",
"pattern",
"<",
"address",
">",
"(",
"bytes",
",",
"action",
")",
";",
"searcher",
"add",
"pattern",
"(",
"generic",
"byte",
"match",
"pattern",
")",
";",
"}"
] |
[
"returns",
"the",
"elected",
"child",
"{",
"@",
"link",
"load",
"balancer",
"provider",
"}"
] | [
"load",
"balancer",
"provider",
"get",
"effective",
"lb",
"provider",
"(",
")",
"{",
"return",
"effective",
"lb",
"provider",
";",
"}"
] |
[
"specify",
"one",
"or",
"more",
"modules",
"by",
"class",
"to",
"be",
"registered",
"with",
"the",
"{",
"@",
"link",
"object",
"mapper",
"}",
"multiple",
"invocations",
"are",
"not",
"additive",
",",
"the",
"last",
"one",
"defines",
"the",
"modules",
"to",
"register",
"modules",
"specified",
"here",
"will",
"be",
"registered",
"after",
"spring",
"'",
"s",
"autodetection",
"of",
"jsr",
"-",
"310",
"and",
"joda",
"-",
"time",
",",
"or",
"jackson",
"'",
"s",
"finding",
"of",
"modules",
"(",
"see",
"{",
"@",
"link",
"#",
"find",
"modules",
"via",
"service",
"loader",
"}",
")",
",",
"allowing",
"to",
"eventually",
"override",
"their",
"configuration",
"specify",
"either",
"this",
"or",
"{",
"@",
"link",
"#",
"modules",
"(",
"module",
")",
"}",
",",
"not",
"both"
] | [
"public",
"final",
"jackson",
"2",
"object",
"mapper",
"builder",
"modules",
"to",
"install",
"(",
"class",
"<",
"?",
"extends",
"module",
">",
"modules",
")",
"{",
"this",
"module",
"classes",
"=",
"modules",
";",
"this",
"find",
"well",
"known",
"modules",
"=",
"true",
";",
"return",
"this",
";",
"}"
] |
[
"reuse",
"the",
"base",
"class",
"hash",
"code",
"method"
] | [
"public",
"int",
"hash",
"code",
"(",
")",
"{",
"return",
"super",
"hash",
"code",
"(",
")",
";",
"}"
] |
[
"returns",
"the",
"next",
"available",
"output",
"buffer",
"index",
"if",
"the",
"next",
"available",
"output",
"is",
"a",
"media",
"format",
"change",
",",
"it",
"will",
"return",
"{",
"@",
"link",
"media",
"codec",
"#",
"info",
"output",
"format",
"changed",
"}",
"and",
"you",
"should",
"call",
"{",
"@",
"link",
"#",
"get",
"output",
"format",
"(",
")",
"}",
"to",
"get",
"the",
"format",
"if",
"there",
"is",
"no",
"available",
"output",
",",
"this",
"method",
"will",
"return",
"{",
"@",
"link",
"media",
"codec",
"#",
"info",
"try",
"again",
"later",
"}"
] | [
"public",
"int",
"dequeue",
"output",
"buffer",
"index",
"(",
"media",
"codec",
"buffer",
"info",
"buffer",
"info",
")",
"{",
"if",
"(",
"available",
"output",
"buffers",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"media",
"codec",
"info",
"try",
"again",
"later",
";",
"}",
"else",
"{",
"int",
"buffer",
"index",
"=",
"available",
"output",
"buffers",
"remove",
"(",
")",
";",
"if",
"(",
"buffer",
"index",
">",
"=",
"0",
")",
"{",
"media",
"codec",
"buffer",
"info",
"next",
"buffer",
"info",
"=",
"buffer",
"infos",
"remove",
"(",
")",
";",
"buffer",
"info",
"set",
"(",
"next",
"buffer",
"info",
"offset",
",",
"next",
"buffer",
"info",
"size",
",",
"next",
"buffer",
"info",
"presentation",
"time",
"us",
",",
"next",
"buffer",
"info",
"flags",
")",
";",
"}",
"else",
"if",
"(",
"buffer",
"index",
"=",
"=",
"media",
"codec",
"info",
"output",
"format",
"changed",
")",
"{",
"current",
"format",
"=",
"formats",
"remove",
"(",
")",
";",
"}",
"return",
"buffer",
"index",
";",
"}",
"}"
] |
[
"the",
"default",
"task",
"scheduler",
"to",
"use",
"if",
"none",
"is",
"registered",
"explicitly",
"via",
"{",
"@",
"link",
"sock",
"js",
"service",
"registration",
"#",
"set",
"task",
"scheduler",
"}",
":",
"<",
"pre",
"class",
"=",
"\"",
"code",
"\"",
">",
"&",
"#",
"064",
";",
"configuration",
"&",
"#",
"064",
";",
"enable",
"web",
"socket",
"public",
"class",
"web",
"socket",
"config",
"implements",
"web",
"socket",
"configurer",
"{",
"public",
"void",
"register",
"web",
"socket",
"handlers",
"(",
"web",
"socket",
"handler",
"registry",
"registry",
")",
"{",
"registry",
"add",
"handler",
"(",
"my",
"handler",
"(",
")",
",",
"\"",
"echo",
"\"",
")",
"with",
"sock",
"j",
"s",
"(",
")",
"set",
"task",
"scheduler",
"(",
"my",
"scheduler",
"(",
")",
")",
";",
"}",
"}"
] | [
"public",
"task",
"scheduler",
"default",
"sock",
"js",
"task",
"scheduler",
"(",
")",
"{",
"if",
"(",
"init",
"handler",
"registry",
"(",
")",
"requires",
"task",
"scheduler",
"(",
")",
")",
"{",
"thread",
"pool",
"task",
"scheduler",
"thread",
"pool",
"scheduler",
"=",
"new",
"thread",
"pool",
"task",
"scheduler",
"(",
")",
";",
"thread",
"pool",
"scheduler",
"set",
"thread",
"name",
"prefix",
"(",
"\"",
"sock",
"j",
"s",
"-",
"\"",
")",
";",
"thread",
"pool",
"scheduler",
"set",
"pool",
"size",
"(",
"runtime",
"get",
"runtime",
"(",
")",
"available",
"processors",
"(",
")",
")",
";",
"thread",
"pool",
"scheduler",
"set",
"remove",
"on",
"cancel",
"policy",
"(",
"true",
")",
";",
"this",
"scheduler",
"=",
"thread",
"pool",
"scheduler",
";",
"}",
"return",
"this",
"scheduler",
";",
"}"
] |
[
"updates",
"a",
"machine",
"learning",
"{",
"@",
"link",
"org",
"elasticsearch",
"client",
"ml",
"job",
"config",
"job",
"}",
"asynchronously",
"for",
"additional",
"info",
"see",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchreferencecurrentml",
"-",
"update",
"-",
"job",
"html",
"\"",
">",
"ml",
"update",
"job",
"documentation"
] | [
"public",
"cancellable",
"update",
"job",
"async",
"(",
"update",
"job",
"request",
"request",
",",
"request",
"options",
"options",
",",
"action",
"listener",
"<",
"put",
"job",
"response",
">",
"listener",
")",
"{",
"return",
"rest",
"high",
"level",
"client",
"perform",
"request",
"async",
"and",
"parse",
"entity",
"(",
"request",
",",
"m",
"l",
"request",
"converters",
":",
":",
"update",
"job",
",",
"options",
",",
"put",
"job",
"response",
":",
":",
"from",
"x",
"content",
",",
"listener",
",",
"collections",
"empty",
"set",
"(",
")",
")",
";",
"}"
] |
[
"get",
"integer",
"item"
] | [
"public",
"integer",
"get",
"integer",
"item",
"(",
")",
"{",
"return",
"integer",
"item",
";",
"}"
] |
[
"select",
"for",
"update",
"recognizer",
"test",
"4"
] | [
"public",
"void",
"select",
"for",
"update",
"recognizer",
"test",
"4",
"(",
")",
"{",
"string",
"sql",
"=",
"\"",
"select",
"name",
"1",
",",
"name",
"2",
"from",
"t",
"1",
"where",
"id",
"in",
"(",
"?",
",",
"?",
")",
"for",
"update",
"\"",
";",
"s",
"q",
"l",
"statement",
"statement",
"=",
"get",
"s",
"q",
"l",
"statement",
"(",
"sql",
")",
";",
"my",
"s",
"q",
"l",
"select",
"for",
"update",
"recognizer",
"my",
"s",
"q",
"l",
"update",
"recognizer",
"=",
"new",
"my",
"s",
"q",
"l",
"select",
"for",
"update",
"recognizer",
"(",
"sql",
",",
"statement",
")",
";",
"assertions",
"assert",
"equals",
"(",
"sql",
",",
"my",
"s",
"q",
"l",
"update",
"recognizer",
"get",
"original",
"s",
"q",
"l",
"(",
")",
")",
";",
"assertions",
"assert",
"equals",
"(",
"\"",
"t",
"1",
"\"",
",",
"my",
"s",
"q",
"l",
"update",
"recognizer",
"get",
"table",
"name",
"(",
")",
")",
";",
"/",
"/",
"test",
"overflow",
"parameters",
"array",
"list",
"<",
"list",
"<",
"object",
">",
">",
"param",
"appender",
"list",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"string",
"where",
"condition",
"=",
"my",
"s",
"q",
"l",
"update",
"recognizer",
"get",
"where",
"condition",
"(",
"new",
"parameters",
"holder",
"(",
")",
"{",
"@",
"override",
"public",
"map",
"<",
"integer",
",",
"array",
"list",
"<",
"object",
">",
">",
"get",
"parameters",
"(",
")",
"{",
"array",
"list",
"<",
"object",
">",
"id",
"1",
"param",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"id",
"1",
"param",
"add",
"(",
"\"",
"id",
"1",
"\"",
")",
";",
"array",
"list",
"<",
"object",
">",
"id",
"2",
"param",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"id",
"2",
"param",
"add",
"(",
"\"",
"id",
"2",
"\"",
")",
";",
"map",
"result",
"=",
"new",
"hash",
"map",
"(",
")",
";",
"result",
"put",
"(",
"1",
",",
"id",
"1",
"param",
")",
";",
"result",
"put",
"(",
"2",
",",
"id",
"2",
"param",
")",
";",
"return",
"result",
";",
"}",
"}",
",",
"param",
"appender",
"list",
")",
";",
"assertions",
"assert",
"equals",
"(",
"collections",
"singleton",
"list",
"(",
"arrays",
"as",
"list",
"(",
"\"",
"id",
"1",
"\"",
",",
"\"",
"id",
"2",
"\"",
")",
")",
",",
"param",
"appender",
"list",
")",
";",
"assertions",
"assert",
"equals",
"(",
"\"",
"id",
"in",
"(",
"?",
",",
"?",
")",
"\"",
",",
"where",
"condition",
")",
";",
"}"
] |
[
"sets",
"set",
"transaction",
"service",
"group"
] | [
"public",
"void",
"set",
"transaction",
"service",
"group",
"(",
"string",
"transaction",
"service",
"group",
")",
"{",
"this",
"transaction",
"service",
"group",
"=",
"transaction",
"service",
"group",
";",
"}"
] |
[
"gets",
"the",
"absolute",
"url",
"of",
"jenkins",
"top",
"page",
",",
"such",
"as",
"{",
"@",
"code",
"http",
":",
"localhostjenkins",
"}",
"unlike",
"{",
"@",
"link",
"#",
"get",
"root",
"url",
"(",
")",
"}",
",",
"which",
"uses",
"the",
"manually",
"configured",
"value",
",",
"this",
"one",
"uses",
"the",
"current",
"request",
"to",
"reconstruct",
"the",
"url",
"the",
"benefit",
"is",
"that",
"this",
"is",
"immune",
"to",
"the",
"configuration",
"mistake",
"(",
"users",
"often",
"fail",
"to",
"set",
"the",
"root",
"url",
"correctly",
",",
"especially",
"when",
"a",
"migration",
"is",
"involved",
")",
",",
"but",
"the",
"downside",
"is",
"that",
"unless",
"you",
"are",
"processing",
"a",
"request",
",",
"this",
"method",
"doesn",
"'",
"t",
"work",
"please",
"note",
"that",
"this",
"will",
"not",
"work",
"in",
"all",
"cases",
"if",
"jenkins",
"is",
"running",
"behind",
"a",
"reverse",
"proxy",
"which",
"has",
"not",
"been",
"fully",
"configured",
"specifically",
"the",
"{",
"@",
"code",
"host",
"}",
"and",
"{",
"@",
"code",
"x",
"-",
"forwarded",
"-",
"proto",
"}",
"headers",
"must",
"be",
"set",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"wiki",
"jenkins",
"-",
"ci",
"orgdisplay",
"j",
"e",
"n",
"k",
"i",
"n",
"s",
"running",
"+",
"jenkins",
"+",
"behind",
"+",
"apache",
"\"",
">",
"running",
"jenkins",
"behind",
"apache",
"shows",
"some",
"examples",
"of",
"configuration"
] | [
"public",
"@",
"non",
"null",
"string",
"get",
"root",
"url",
"from",
"request",
"(",
")",
"{",
"stapler",
"request",
"req",
"=",
"stapler",
"get",
"current",
"request",
"(",
")",
";",
"if",
"(",
"req",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"cannot",
"call",
"get",
"root",
"url",
"from",
"request",
"from",
"outside",
"a",
"request",
"handling",
"thread",
"\"",
")",
";",
"}",
"string",
"builder",
"buf",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"string",
"scheme",
"=",
"get",
"x",
"forwarded",
"header",
"(",
"req",
",",
"\"",
"x",
"-",
"forwarded",
"-",
"proto",
"\"",
",",
"req",
"get",
"scheme",
"(",
")",
")",
";",
"buf",
"append",
"(",
"scheme",
")",
"append",
"(",
"\"",
":",
"/",
"/",
"\"",
")",
";",
"string",
"host",
"=",
"get",
"x",
"forwarded",
"header",
"(",
"req",
",",
"\"",
"x",
"-",
"forwarded",
"-",
"host",
"\"",
",",
"req",
"get",
"server",
"name",
"(",
")",
")",
";",
"int",
"index",
"=",
"host",
"last",
"index",
"of",
"(",
"'",
":",
"'",
")",
";",
"int",
"port",
"=",
"req",
"get",
"server",
"port",
"(",
")",
";",
"if",
"(",
"index",
"=",
"=",
"-",
"1",
")",
"{",
"/",
"/",
"almost",
"everyone",
"else",
"except",
"nginx",
"put",
"the",
"host",
"and",
"port",
"in",
"separate",
"headers",
"buf",
"append",
"(",
"host",
")",
";",
"}",
"else",
"{",
"if",
"(",
"host",
"starts",
"with",
"(",
"\"",
"[",
"\"",
")",
"&",
"&",
"host",
"ends",
"with",
"(",
"\"",
"]",
"\"",
")",
")",
"{",
"/",
"/",
"support",
"i",
"pv",
"6",
"address",
"buf",
"append",
"(",
"host",
")",
";",
"}",
"else",
"{",
"/",
"/",
"nginx",
"uses",
"the",
"same",
"spec",
"as",
"for",
"the",
"host",
"header",
",",
"i",
"e",
"hostname",
":",
"port",
"buf",
"append",
"(",
"host",
",",
"0",
",",
"index",
")",
";",
"if",
"(",
"index",
"+",
"1",
"<",
"host",
"length",
"(",
")",
")",
"{",
"try",
"{",
"port",
"=",
"integer",
"parse",
"int",
"(",
"host",
"substring",
"(",
"index",
"+",
"1",
")",
")",
";",
"}",
"catch",
"(",
"number",
"format",
"exception",
"e",
")",
"{",
"/",
"/",
"ignore",
"}",
"}",
"/",
"/",
"but",
"if",
"a",
"user",
"has",
"configured",
"nginx",
"with",
"an",
"x",
"-",
"forwarded",
"-",
"port",
",",
"that",
"will",
"win",
"out",
"}",
"}",
"string",
"forwarded",
"port",
"=",
"get",
"x",
"forwarded",
"header",
"(",
"req",
",",
"\"",
"x",
"-",
"forwarded",
"-",
"port",
"\"",
",",
"null",
")",
";",
"if",
"(",
"forwarded",
"port",
"!",
"=",
"null",
")",
"{",
"try",
"{",
"port",
"=",
"integer",
"parse",
"int",
"(",
"forwarded",
"port",
")",
";",
"}",
"catch",
"(",
"number",
"format",
"exception",
"e",
")",
"{",
"/",
"/",
"ignore",
"}",
"}",
"if",
"(",
"port",
"!",
"=",
"(",
"\"",
"https",
"\"",
"equals",
"(",
"scheme",
")",
"?",
"443",
":",
"80",
")",
")",
"{",
"buf",
"append",
"(",
"'",
":",
"'",
")",
"append",
"(",
"port",
")",
";",
"}",
"buf",
"append",
"(",
"req",
"get",
"context",
"path",
"(",
")",
")",
"append",
"(",
"'",
"/",
"'",
")",
";",
"return",
"buf",
"to",
"string",
"(",
")",
";",
"}"
] |
[
"test",
"equality",
"and",
"hash",
"code",
"properties"
] | [
"public",
"void",
"test",
"equals",
"and",
"hashcode",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"for",
"(",
"int",
"runs",
"=",
"0",
";",
"runs",
"<",
"number",
"of",
"runs",
";",
"runs",
"+",
"+",
")",
"{",
"final",
"direct",
"candidate",
"generator",
"builder",
"original",
"=",
"random",
"candidate",
"generator",
"(",
")",
";",
"check",
"equals",
"and",
"hash",
"code",
"(",
"original",
",",
"direct",
"candidate",
"generator",
"tests",
":",
":",
"copy",
",",
"direct",
"candidate",
"generator",
"tests",
":",
":",
"mutate",
")",
";",
"}",
"}"
] |
[
"return",
"the",
"encoding",
"for",
"the",
"free",
"marker",
"template"
] | [
"protected",
"string",
"get",
"encoding",
"(",
")",
"{",
"return",
"this",
"encoding",
";",
"}"
] |
[
"sets",
"the",
"array",
"size",
",",
"leaving",
"any",
"values",
"beyond",
"the",
"current",
"size",
"undefined"
] | [
"public",
"long",
"[",
"]",
"set",
"size",
"(",
"int",
"new",
"size",
")",
"{",
"if",
"(",
"new",
"size",
"<",
"0",
")",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"new",
"size",
"must",
"be",
">",
"=",
"0",
":",
"\"",
"+",
"new",
"size",
")",
";",
"if",
"(",
"new",
"size",
">",
"items",
"length",
")",
"resize",
"(",
"math",
"max",
"(",
"8",
",",
"new",
"size",
")",
")",
";",
"size",
"=",
"new",
"size",
";",
"return",
"items",
";",
"}"
] |
[
"test",
"with",
"one",
"nested",
"directory",
"and",
"recursive",
"file",
"enumeration",
"=",
"true"
] | [
"public",
"void",
"test",
"one",
"nested",
"directory",
"true",
"(",
")",
"{",
"try",
"{",
"string",
"first",
"level",
"dir",
"=",
"test",
"file",
"utils",
"random",
"file",
"name",
"(",
")",
";",
"string",
"second",
"level",
"dir",
"=",
"test",
"file",
"utils",
"random",
"file",
"name",
"(",
")",
";",
"file",
"inside",
"nested",
"dir",
"=",
"temp",
"folder",
"new",
"folder",
"(",
"first",
"level",
"dir",
",",
"second",
"level",
"dir",
")",
";",
"file",
"nested",
"dir",
"=",
"inside",
"nested",
"dir",
"get",
"parent",
"file",
"(",
")",
";",
"/",
"/",
"create",
"a",
"file",
"in",
"the",
"first",
"-",
"level",
"and",
"two",
"files",
"in",
"the",
"nested",
"dir",
"test",
"file",
"utils",
"create",
"temp",
"file",
"in",
"directory",
"(",
"nested",
"dir",
"get",
"absolute",
"path",
"(",
")",
",",
"\"",
"paella",
"\"",
")",
";",
"test",
"file",
"utils",
"create",
"temp",
"file",
"in",
"directory",
"(",
"inside",
"nested",
"dir",
"get",
"absolute",
"path",
"(",
")",
",",
"\"",
"kalamari",
"\"",
")",
";",
"test",
"file",
"utils",
"create",
"temp",
"file",
"in",
"directory",
"(",
"inside",
"nested",
"dir",
"get",
"absolute",
"path",
"(",
")",
",",
"\"",
"fideua",
"\"",
")",
";",
"this",
"format",
"set",
"file",
"path",
"(",
"new",
"path",
"(",
"nested",
"dir",
"to",
"u",
"r",
"i",
"(",
")",
"to",
"string",
"(",
")",
")",
")",
";",
"this",
"config",
"set",
"boolean",
"(",
"\"",
"recursive",
"file",
"enumeration",
"\"",
",",
"true",
")",
";",
"format",
"configure",
"(",
"this",
"config",
")",
";",
"file",
"input",
"split",
"[",
"]",
"splits",
"=",
"format",
"create",
"input",
"splits",
"(",
"1",
")",
";",
"assert",
"assert",
"equals",
"(",
"3",
",",
"splits",
"length",
")",
";",
"}",
"catch",
"(",
"exception",
"ex",
")",
"{",
"ex",
"print",
"stack",
"trace",
"(",
")",
";",
"assert",
"fail",
"(",
"ex",
"get",
"message",
"(",
")",
")",
";",
"}",
"}"
] |
[
"test",
"invalid",
"argument",
"to",
"the",
"tool"
] | [
"public",
"void",
"test",
"invalid",
"argument",
"(",
")",
"throws",
"exception",
"{",
"hdfs",
"configuration",
"conf",
"=",
"new",
"hdfs",
"configuration",
"(",
")",
";",
"string",
"[",
"]",
"args",
"=",
"{",
"\"",
"-",
"invalid",
"argument",
"\"",
"}",
";",
"string",
"ret",
"=",
"run",
"tool",
"(",
"conf",
",",
"args",
",",
"false",
")",
";",
"assert",
"true",
"(",
"ret",
"contains",
"(",
"get",
"conf",
"usage",
")",
")",
";",
"}"
] |
[
"when",
"adding",
"a",
"reference",
"on",
"top",
"of",
"an",
"existing",
"reference",
",",
"attempt",
"to",
"combine",
"the",
"reference",
"types",
"giving",
"preference",
"to",
"the",
"most",
"specific",
"type"
] | [
"private",
"ref",
"type",
"combine",
"reference",
"type",
"(",
"ref",
"type",
"new",
"type",
",",
"ref",
"type",
"old",
"type",
")",
"{",
"if",
"(",
"new",
"type",
"=",
"=",
"ref",
"type",
"data",
")",
"{",
"if",
"(",
"old",
"type",
"is",
"data",
"(",
")",
")",
"{",
"return",
"old",
"type",
";",
"}",
"}",
"if",
"(",
"new",
"type",
"=",
"=",
"ref",
"type",
"data",
"ind",
")",
"{",
"if",
"(",
"old",
"type",
"is",
"indirect",
"(",
")",
")",
"{",
"return",
"old",
"type",
";",
"}",
"}",
"else",
"if",
"(",
"new",
"type",
"=",
"=",
"ref",
"type",
"read",
")",
"{",
"if",
"(",
"old",
"type",
"=",
"=",
"ref",
"type",
"write",
"|",
"|",
"old",
"type",
"=",
"=",
"ref",
"type",
"read",
"write",
")",
"{",
"return",
"ref",
"type",
"read",
"write",
";",
"}",
"}",
"else",
"if",
"(",
"new",
"type",
"=",
"=",
"ref",
"type",
"write",
")",
"{",
"if",
"(",
"old",
"type",
"=",
"=",
"ref",
"type",
"read",
"|",
"|",
"old",
"type",
"=",
"=",
"ref",
"type",
"read",
"write",
")",
"{",
"return",
"ref",
"type",
"read",
"write",
";",
"}",
"}",
"if",
"(",
"new",
"type",
"=",
"=",
"ref",
"type",
"read",
"ind",
")",
"{",
"if",
"(",
"old",
"type",
"=",
"=",
"ref",
"type",
"write",
"ind",
"|",
"|",
"old",
"type",
"=",
"=",
"ref",
"type",
"read",
"write",
"ind",
")",
"{",
"return",
"ref",
"type",
"read",
"write",
"ind",
";",
"}",
"}",
"if",
"(",
"new",
"type",
"=",
"=",
"ref",
"type",
"write",
"ind",
")",
"{",
"if",
"(",
"old",
"type",
"=",
"=",
"ref",
"type",
"read",
"ind",
"|",
"|",
"old",
"type",
"=",
"=",
"ref",
"type",
"read",
"write",
"ind",
")",
"{",
"return",
"ref",
"type",
"read",
"write",
"ind",
";",
"}",
"}",
"return",
"new",
"type",
";",
"}"
] |
[
"returns",
"a",
"{",
"@",
"link",
"byte",
"source",
"}",
"view",
"of",
"this",
"char",
"source",
"that",
"encodes",
"chars",
"read",
"from",
"this",
"source",
"as",
"bytes",
"using",
"the",
"given",
"{",
"@",
"link",
"charset",
"}",
"if",
"{",
"@",
"link",
"byte",
"source",
"#",
"as",
"char",
"source",
"}",
"is",
"called",
"on",
"the",
"returned",
"source",
"with",
"the",
"same",
"charset",
",",
"the",
"default",
"implementation",
"of",
"this",
"method",
"will",
"ensure",
"that",
"the",
"original",
"{",
"@",
"code",
"char",
"source",
"}",
"is",
"returned",
",",
"rather",
"than",
"round",
"-",
"trip",
"encoding",
"subclasses",
"that",
"override",
"this",
"method",
"should",
"behave",
"the",
"same",
"way"
] | [
"public",
"byte",
"source",
"as",
"byte",
"source",
"(",
"charset",
"charset",
")",
"{",
"return",
"new",
"as",
"byte",
"source",
"(",
"charset",
")",
";",
"}"
] |
[
"returns",
"a",
"list",
"of",
"options",
"to",
"use",
"for",
"compiling",
"swift"
] | [
"public",
"immutable",
"list",
"<",
"string",
">",
"get",
"copts",
"(",
")",
"{",
"return",
"copts",
";",
"}"
] |
[
"we",
"get",
"the",
"size",
"from",
"a",
"generic",
"image"
] | [
"private",
"image",
"meta",
"data",
"read",
"image",
"meta",
"data",
"(",
")",
"{",
"input",
"stream",
"input",
"stream",
"=",
"null",
";",
"image",
"meta",
"data",
"meta",
"data",
"=",
"null",
";",
"try",
"{",
"input",
"stream",
"=",
"get",
"input",
"stream",
"(",
")",
";",
"meta",
"data",
"=",
"bitmap",
"util",
"decode",
"dimensions",
"and",
"color",
"space",
"(",
"input",
"stream",
")",
";",
"m",
"color",
"space",
"=",
"meta",
"data",
"get",
"color",
"space",
"(",
")",
";",
"pair",
"<",
"integer",
",",
"integer",
">",
"dimensions",
"=",
"meta",
"data",
"get",
"dimensions",
"(",
")",
";",
"if",
"(",
"dimensions",
"!",
"=",
"null",
")",
"{",
"m",
"width",
"=",
"dimensions",
"first",
";",
"m",
"height",
"=",
"dimensions",
"second",
";",
"}",
"}",
"finally",
"{",
"if",
"(",
"input",
"stream",
"!",
"=",
"null",
")",
"{",
"try",
"{",
"input",
"stream",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"/",
"/",
"head",
"in",
"the",
"sand",
"}",
"}",
"}",
"return",
"meta",
"data",
";",
"}"
] |
[
"returns",
"an",
"immutable",
"map",
"containing",
"the",
"same",
"entries",
"as",
"{",
"@",
"code",
"map",
"}",
"the",
"returned",
"map",
"iterates",
"over",
"entries",
"in",
"the",
"same",
"order",
"as",
"the",
"{",
"@",
"code",
"entry",
"set",
"}",
"of",
"the",
"original",
"map",
"if",
"{",
"@",
"code",
"map",
"}",
"somehow",
"contains",
"entries",
"with",
"duplicate",
"keys",
"(",
"for",
"example",
",",
"if",
"it",
"is",
"a",
"{",
"@",
"code",
"sorted",
"map",
"}",
"whose",
"comparator",
"is",
"not",
"consistent",
"with",
"equals",
")",
",",
"the",
"results",
"of",
"this",
"method",
"are",
"undefined",
"despite",
"the",
"method",
"name",
",",
"this",
"method",
"attempts",
"to",
"avoid",
"actually",
"copying",
"the",
"data",
"when",
"it",
"is",
"safe",
"to",
"do",
"so",
"the",
"exact",
"circumstances",
"under",
"which",
"a",
"copy",
"will",
"or",
"will",
"not",
"be",
"performed",
"are",
"undocumented",
"and",
"subject",
"to",
"change"
] | [
"public",
"static",
"<",
"k",
",",
"v",
">",
"immutable",
"map",
"<",
"k",
",",
"v",
">",
"copy",
"of",
"(",
"map",
"<",
"?",
"extends",
"k",
",",
"?",
"extends",
"v",
">",
"map",
")",
"{",
"if",
"(",
"(",
"map",
"instanceof",
"immutable",
"map",
")",
"&",
"&",
"!",
"(",
"map",
"instanceof",
"sorted",
"map",
")",
")",
"{",
"@",
"suppress",
"warnings",
"(",
"\"",
"unchecked",
"\"",
")",
"/",
"/",
"safe",
"since",
"map",
"is",
"not",
"writable",
"immutable",
"map",
"<",
"k",
",",
"v",
">",
"kv",
"map",
"=",
"(",
"immutable",
"map",
"<",
"k",
",",
"v",
">",
")",
"map",
";",
"if",
"(",
"!",
"kv",
"map",
"is",
"partial",
"view",
"(",
")",
")",
"{",
"return",
"kv",
"map",
";",
"}",
"}",
"else",
"if",
"(",
"map",
"instanceof",
"enum",
"map",
")",
"{",
"@",
"suppress",
"warnings",
"(",
"\"",
"unchecked",
"\"",
")",
"/",
"/",
"safe",
"since",
"map",
"is",
"not",
"writable",
"immutable",
"map",
"<",
"k",
",",
"v",
">",
"kv",
"map",
"=",
"(",
"immutable",
"map",
"<",
"k",
",",
"v",
">",
")",
"copy",
"of",
"enum",
"map",
"(",
"(",
"enum",
"map",
"<",
"?",
",",
"?",
">",
")",
"map",
")",
";",
"return",
"kv",
"map",
";",
"}",
"return",
"copy",
"of",
"(",
"map",
"entry",
"set",
"(",
")",
")",
";",
"}"
] |
[
"delegate",
"delete",
"requests",
"to",
"{",
"@",
"link",
"#",
"process",
"request",
"}"
] | [
"protected",
"final",
"void",
"do",
"delete",
"(",
"http",
"servlet",
"request",
"request",
",",
"http",
"servlet",
"response",
"response",
")",
"throws",
"servlet",
"exception",
",",
"i",
"o",
"exception",
"{",
"process",
"request",
"(",
"request",
",",
"response",
")",
";",
"}"
] |
[
"access",
"to",
"response",
"body",
"assertions",
"using",
"a",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"github",
"comjayway",
"json",
"path",
"\"",
">",
"json",
"path",
"expression",
"to",
"inspect",
"a",
"specific",
"subset",
"of",
"the",
"body",
"the",
"json",
"path",
"expression",
"can",
"be",
"a",
"parameterized",
"string",
"using",
"formatting",
"specifiers",
"as",
"defined",
"in",
"{",
"@",
"link",
"string",
"#",
"format",
"}"
] | [
"json",
"path",
"assertions",
"json",
"path",
"(",
"string",
"expression",
",",
"object",
"args",
")",
";"
] |
[
"returns",
"the",
"paths",
"to",
"the",
"children",
"of",
"this",
"directory",
"returns",
"an",
"empty",
"list",
"if",
"this",
"file",
"handle",
"represents",
"a",
"file",
"and",
"not",
"a",
"directory",
"on",
"the",
"desktop",
",",
"an",
"file",
"type",
"#",
"internal",
"handle",
"to",
"a",
"directory",
"on",
"the",
"classpath",
"will",
"return",
"a",
"zero",
"length",
"array",
"@",
"throw",
"runtime",
"exception",
"if",
"this",
"file",
"is",
"an",
"{",
"@",
"link",
"file",
"type",
"#",
"classpath",
"}",
"file"
] | [
"public",
"file",
"descriptor",
"[",
"]",
"list",
"(",
")",
"{",
"if",
"(",
"type",
"=",
"=",
"file",
"type",
"classpath",
")",
"throw",
"new",
"runtime",
"exception",
"(",
"\"",
"cannot",
"list",
"a",
"classpath",
"directory",
":",
"\"",
"+",
"file",
")",
";",
"string",
"[",
"]",
"relative",
"paths",
"=",
"file",
"(",
")",
"list",
"(",
")",
";",
"if",
"(",
"relative",
"paths",
"=",
"=",
"null",
")",
"return",
"new",
"file",
"descriptor",
"[",
"0",
"]",
";",
"file",
"descriptor",
"[",
"]",
"handles",
"=",
"new",
"file",
"descriptor",
"[",
"relative",
"paths",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"n",
"=",
"relative",
"paths",
"length",
";",
"i",
"<",
"n",
";",
"i",
"+",
"+",
")",
"handles",
"[",
"i",
"]",
"=",
"child",
"(",
"relative",
"paths",
"[",
"i",
"]",
")",
";",
"return",
"handles",
";",
"}"
] |
[
"returns",
"the",
"current",
"cfm",
"version"
] | [
"public",
"int",
"get",
"current",
"version",
"(",
")",
"{",
"return",
"current",
"version",
";",
"}"
] |
[
"exit",
"a",
"parse",
"tree",
"produced",
"by",
"the",
"{",
"@",
"code",
"current",
"date",
"time",
"function",
"}",
"labeled",
"alternative",
"in",
"{",
"@",
"link",
"sql",
"base",
"parser",
"#",
"primary",
"expression",
"}"
] | [
"void",
"exit",
"current",
"date",
"time",
"function",
"(",
"sql",
"base",
"parser",
"current",
"date",
"time",
"function",
"context",
"ctx",
")",
";"
] |
[
"poll",
"for",
"any",
"network",
"io"
] | [
"public",
"void",
"poll",
"(",
"timer",
"timer",
",",
"poll",
"condition",
"poll",
"condition",
")",
"{",
"poll",
"(",
"timer",
",",
"poll",
"condition",
",",
"false",
")",
";",
"}"
] |
[
"disposes",
"this",
"index",
"buffer",
"object",
"and",
"all",
"its",
"associated",
"open",
"g",
"l",
"resources"
] | [
"public",
"void",
"dispose",
"(",
")",
"{",
"gl20",
"gl",
"=",
"gdx",
"gl",
"2",
"0",
";",
"gl",
"gl",
"bind",
"buffer",
"(",
"gl20",
"gl",
"element",
"array",
"buffer",
",",
"0",
")",
";",
"gl",
"gl",
"delete",
"buffer",
"(",
"buffer",
"handle",
")",
";",
"buffer",
"handle",
"=",
"0",
";",
"}"
] |
[
"purges",
"samples",
"with",
"timestamps",
"older",
"than",
"cutoff"
] | [
"void",
"purge",
"(",
"long",
"cutoff",
")",
"{",
"while",
"(",
"sample",
"count",
">",
"=",
"min",
"queue",
"size",
"&",
"&",
"oldest",
"!",
"=",
"null",
"&",
"&",
"cutoff",
"-",
"oldest",
"timestamp",
">",
"0",
")",
"{",
"sample",
"removed",
"=",
"oldest",
";",
"if",
"(",
"removed",
"accelerating",
")",
"{",
"accelerating",
"count",
"-",
"-",
";",
"}",
"sample",
"count",
"-",
"-",
";",
"oldest",
"=",
"removed",
"next",
";",
"if",
"(",
"oldest",
"=",
"=",
"null",
")",
"{",
"newest",
"=",
"null",
";",
"}",
"pool",
"release",
"(",
"removed",
")",
";",
"}",
"}"
] |
[
"@",
"inherit",
"doc"
] | [
"public",
"int",
"get",
"register",
"count",
"(",
")",
"{",
"return",
"register",
"count",
";",
"}"
] |
[
"tests",
"that",
"input",
"gate",
"requests",
"and",
"assigns",
"network",
"buffers",
"for",
"remote",
"input",
"channel"
] | [
"public",
"void",
"test",
"request",
"buffers",
"with",
"remote",
"input",
"channel",
"(",
")",
"throws",
"exception",
"{",
"final",
"netty",
"shuffle",
"environment",
"network",
"=",
"create",
"netty",
"shuffle",
"environment",
"(",
")",
";",
"final",
"single",
"input",
"gate",
"input",
"gate",
"=",
"create",
"input",
"gate",
"(",
"network",
",",
"1",
",",
"result",
"partition",
"type",
"pipelined",
"bounded",
")",
";",
"int",
"buffers",
"per",
"channel",
"=",
"2",
";",
"int",
"extra",
"network",
"buffers",
"per",
"gate",
"=",
"8",
";",
"try",
"(",
"closer",
"closer",
"=",
"closer",
"create",
"(",
")",
")",
"{",
"closer",
"register",
"(",
"network",
":",
":",
"close",
")",
";",
"closer",
"register",
"(",
"input",
"gate",
":",
":",
"close",
")",
";",
"remote",
"input",
"channel",
"remote",
"=",
"input",
"channel",
"builder",
"new",
"builder",
"(",
")",
"setup",
"from",
"netty",
"shuffle",
"environment",
"(",
"network",
")",
"set",
"connection",
"manager",
"(",
"new",
"testing",
"connection",
"manager",
"(",
")",
")",
"build",
"remote",
"channel",
"(",
"input",
"gate",
")",
";",
"input",
"gate",
"set",
"input",
"channels",
"(",
"remote",
")",
";",
"input",
"gate",
"setup",
"(",
")",
";",
"network",
"buffer",
"pool",
"buffer",
"pool",
"=",
"network",
"get",
"network",
"buffer",
"pool",
"(",
")",
";",
"/",
"/",
"only",
"the",
"exclusive",
"buffers",
"should",
"be",
"assigned",
"/",
"available",
"now",
"assert",
"equals",
"(",
"buffers",
"per",
"channel",
",",
"remote",
"get",
"number",
"of",
"available",
"buffers",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"buffer",
"pool",
"get",
"total",
"number",
"of",
"memory",
"segments",
"(",
")",
"-",
"buffers",
"per",
"channel",
"-",
"1",
",",
"buffer",
"pool",
"get",
"number",
"of",
"available",
"memory",
"segments",
"(",
")",
")",
";",
"/",
"/",
"note",
":",
"exclusive",
"buffers",
"are",
"not",
"handed",
"out",
"into",
"local",
"buffer",
"pool",
"and",
"are",
"thus",
"not",
"/",
"/",
"counted",
"assert",
"equals",
"(",
"extra",
"network",
"buffers",
"per",
"gate",
",",
"buffer",
"pool",
"count",
"buffers",
"(",
")",
")",
";",
"}",
"}"
] |
[
"parses",
"the",
"supplied",
"{",
"@",
"code",
"<",
"pointcut",
">",
"}",
"and",
"registers",
"the",
"resulting",
"pointcut",
"with",
"the",
"bean",
"definition",
"registry"
] | [
"private",
"abstract",
"bean",
"definition",
"parse",
"pointcut",
"(",
"element",
"pointcut",
"element",
",",
"parser",
"context",
"parser",
"context",
")",
"{",
"string",
"id",
"=",
"pointcut",
"element",
"get",
"attribute",
"(",
"id",
")",
";",
"string",
"expression",
"=",
"pointcut",
"element",
"get",
"attribute",
"(",
"expression",
")",
";",
"abstract",
"bean",
"definition",
"pointcut",
"definition",
"=",
"null",
";",
"try",
"{",
"this",
"parse",
"state",
"push",
"(",
"new",
"pointcut",
"entry",
"(",
"id",
")",
")",
";",
"pointcut",
"definition",
"=",
"create",
"pointcut",
"definition",
"(",
"expression",
")",
";",
"pointcut",
"definition",
"set",
"source",
"(",
"parser",
"context",
"extract",
"source",
"(",
"pointcut",
"element",
")",
")",
";",
"string",
"pointcut",
"bean",
"name",
"=",
"id",
";",
"if",
"(",
"string",
"utils",
"has",
"text",
"(",
"pointcut",
"bean",
"name",
")",
")",
"{",
"parser",
"context",
"get",
"registry",
"(",
")",
"register",
"bean",
"definition",
"(",
"pointcut",
"bean",
"name",
",",
"pointcut",
"definition",
")",
";",
"}",
"else",
"{",
"pointcut",
"bean",
"name",
"=",
"parser",
"context",
"get",
"reader",
"context",
"(",
")",
"register",
"with",
"generated",
"name",
"(",
"pointcut",
"definition",
")",
";",
"}",
"parser",
"context",
"register",
"component",
"(",
"new",
"pointcut",
"component",
"definition",
"(",
"pointcut",
"bean",
"name",
",",
"pointcut",
"definition",
",",
"expression",
")",
")",
";",
"}",
"finally",
"{",
"this",
"parse",
"state",
"pop",
"(",
")",
";",
"}",
"return",
"pointcut",
"definition",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"returns",
"a",
"future",
"holding",
"the",
"serialized",
"request",
"result"
] | [
"private",
"completable",
"future",
"<",
"kv",
"state",
"response",
">",
"get",
"kv",
"state",
"(",
"final",
"job",
"i",
"d",
"job",
"id",
",",
"final",
"string",
"queryable",
"state",
"name",
",",
"final",
"int",
"key",
"hash",
"code",
",",
"final",
"byte",
"[",
"]",
"serialized",
"key",
"and",
"namespace",
")",
"{",
"log",
"debug",
"(",
"\"",
"sending",
"state",
"request",
"to",
"{",
"}",
"\"",
",",
"remote",
"address",
")",
";",
"try",
"{",
"kv",
"state",
"request",
"request",
"=",
"new",
"kv",
"state",
"request",
"(",
"job",
"id",
",",
"queryable",
"state",
"name",
",",
"key",
"hash",
"code",
",",
"serialized",
"key",
"and",
"namespace",
")",
";",
"return",
"client",
"send",
"request",
"(",
"remote",
"address",
",",
"request",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"log",
"error",
"(",
"\"",
"unable",
"to",
"send",
"k",
"v",
"state",
"request",
":",
"\"",
",",
"e",
")",
";",
"return",
"future",
"utils",
"get",
"failed",
"future",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"returns",
"whether",
"the",
"ad",
"error",
"indicates",
"that",
"an",
"entire",
"ad",
"group",
"failed",
"to",
"load"
] | [
"public",
"static",
"boolean",
"is",
"ad",
"group",
"load",
"error",
"(",
"ad",
"error",
"ad",
"error",
")",
"{",
"/",
"/",
"todo",
":",
"find",
"out",
"what",
"other",
"errors",
"need",
"to",
"be",
"handled",
"(",
"if",
"any",
")",
",",
"and",
"whether",
"each",
"one",
"relates",
"to",
"/",
"/",
"a",
"single",
"ad",
",",
"ad",
"group",
"or",
"the",
"whole",
"timeline",
"return",
"ad",
"error",
"get",
"error",
"code",
"(",
")",
"=",
"=",
"ad",
"error",
"ad",
"error",
"code",
"vast",
"linear",
"asset",
"mismatch",
"|",
"|",
"ad",
"error",
"get",
"error",
"code",
"(",
")",
"=",
"=",
"ad",
"error",
"ad",
"error",
"code",
"unknown",
"error",
";",
"}"
] |
[
"model",
"tests",
"for",
"order"
] | [
"public",
"void",
"test",
"order",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"order",
"}"
] |
[
"create",
"an",
"instance",
"of",
"a",
"class"
] | [
"private",
"int",
"create",
"class",
"instance",
"(",
"string",
"name",
")",
"{",
"try",
"{",
"class",
"clazz",
"=",
"get",
"class",
"(",
"name",
")",
";",
"loaded",
"class",
"(",
"name",
",",
"clazz",
")",
";",
"object",
"instance",
"=",
"clazz",
"new",
"instance",
"(",
")",
";",
"try",
"{",
"/",
"/",
"stringify",
"out",
"(",
"\"",
"created",
"instance",
"\"",
"+",
"instance",
"to",
"string",
"(",
")",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"/",
"/",
"catch",
"those",
"classes",
"whose",
"to",
"string",
"(",
")",
"method",
"is",
"brittle",
",",
"but",
"don",
"'",
"t",
"fail",
"the",
"probe",
"print",
"stack",
"(",
"e",
",",
"\"",
"created",
"class",
"instance",
"but",
"the",
"to",
"string",
"(",
")",
"operator",
"failed",
"\"",
")",
";",
"}",
"return",
"success",
";",
"}",
"catch",
"(",
"class",
"not",
"found",
"exception",
"e",
")",
"{",
"print",
"stack",
"(",
"e",
",",
"\"",
"class",
"not",
"found",
"\"",
"+",
"name",
")",
";",
"return",
"e",
"not",
"found",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"print",
"stack",
"(",
"e",
",",
"\"",
"exception",
"while",
"creating",
"class",
"\"",
"+",
"name",
")",
";",
"return",
"e",
"create",
"failed",
";",
"}",
"catch",
"(",
"error",
"e",
")",
"{",
"print",
"stack",
"(",
"e",
",",
"\"",
"exception",
"while",
"creating",
"class",
"\"",
"+",
"name",
")",
";",
"return",
"e",
"create",
"failed",
";",
"}",
"}"
] |
[
"test",
"throwing",
"a",
"{",
"@",
"link",
"org",
"elasticsearch",
"action",
"support",
"replication",
"transport",
"replication",
"action",
"retry",
"on",
"replica",
"exception",
"}",
"causes",
"a",
"retry"
] | [
"public",
"void",
"test",
"retry",
"on",
"replica",
"(",
")",
"throws",
"exception",
"{",
"final",
"shard",
"id",
"shard",
"id",
"=",
"new",
"shard",
"id",
"(",
"\"",
"test",
"\"",
",",
"\"",
"na",
"\"",
",",
"0",
")",
";",
"cluster",
"state",
"state",
"=",
"state",
"(",
"shard",
"id",
"get",
"index",
"name",
"(",
")",
",",
"true",
",",
"shard",
"routing",
"state",
"started",
",",
"shard",
"routing",
"state",
"started",
")",
";",
"final",
"shard",
"routing",
"replica",
"=",
"state",
"get",
"routing",
"table",
"(",
")",
"shard",
"routing",
"table",
"(",
"shard",
"id",
")",
"replica",
"shards",
"(",
")",
"get",
"(",
"0",
")",
";",
"final",
"long",
"primary",
"term",
"=",
"state",
"metadata",
"(",
")",
"index",
"(",
"shard",
"id",
"get",
"index",
"name",
"(",
")",
")",
"primary",
"term",
"(",
"shard",
"id",
"id",
"(",
")",
")",
";",
"/",
"/",
"simulate",
"execution",
"of",
"the",
"node",
"holding",
"the",
"replica",
"state",
"=",
"cluster",
"state",
"builder",
"(",
"state",
")",
"nodes",
"(",
"discovery",
"nodes",
"builder",
"(",
"state",
"nodes",
"(",
")",
")",
"local",
"node",
"id",
"(",
"replica",
"current",
"node",
"id",
"(",
")",
")",
")",
"build",
"(",
")",
";",
"set",
"state",
"(",
"cluster",
"service",
",",
"state",
")",
";",
"atomic",
"boolean",
"throw",
"exception",
"=",
"new",
"atomic",
"boolean",
"(",
"true",
")",
";",
"final",
"replication",
"task",
"task",
"=",
"maybe",
"task",
"(",
")",
";",
"test",
"action",
"action",
"=",
"new",
"test",
"action",
"(",
"settings",
"empty",
",",
"\"",
"internal",
":",
"test",
"action",
"with",
"exceptions",
"\"",
",",
"transport",
"service",
",",
"cluster",
"service",
",",
"shard",
"state",
"action",
",",
"thread",
"pool",
")",
"{",
"@",
"override",
"protected",
"void",
"shard",
"operation",
"on",
"replica",
"(",
"request",
"shard",
"request",
",",
"index",
"shard",
"replica",
",",
"action",
"listener",
"<",
"replica",
"result",
">",
"listener",
")",
"{",
"action",
"listener",
"complete",
"with",
"(",
"listener",
",",
"(",
")",
"-",
">",
"{",
"assert",
"phase",
"(",
"task",
",",
"\"",
"replica",
"\"",
")",
";",
"if",
"(",
"throw",
"exception",
"get",
"(",
")",
")",
"{",
"throw",
"new",
"retry",
"on",
"replica",
"exception",
"(",
"shard",
"id",
",",
"\"",
"simulation",
"\"",
")",
";",
"}",
"return",
"new",
"replica",
"result",
"(",
")",
";",
"}",
")",
";",
"}",
"}",
";",
"final",
"plain",
"action",
"future",
"<",
"transport",
"response",
">",
"listener",
"=",
"new",
"plain",
"action",
"future",
"<",
">",
"(",
")",
";",
"final",
"request",
"request",
"=",
"new",
"request",
"(",
"shard",
"id",
")",
";",
"final",
"long",
"checkpoint",
"=",
"random",
"non",
"negative",
"long",
"(",
")",
";",
"final",
"long",
"max",
"seq",
"no",
"of",
"updates",
"or",
"deletes",
"=",
"random",
"non",
"negative",
"long",
"(",
")",
";",
"action",
"handle",
"replica",
"request",
"(",
"new",
"transport",
"replication",
"action",
"concrete",
"replica",
"request",
"<",
">",
"(",
"request",
",",
"replica",
"allocation",
"id",
"(",
")",
"get",
"id",
"(",
")",
",",
"primary",
"term",
",",
"checkpoint",
",",
"max",
"seq",
"no",
"of",
"updates",
"or",
"deletes",
")",
",",
"create",
"transport",
"channel",
"(",
"listener",
")",
",",
"task",
")",
";",
"if",
"(",
"listener",
"is",
"done",
"(",
")",
")",
"{",
"listener",
"get",
"(",
")",
";",
"/",
"/",
"fail",
"with",
"the",
"exception",
"if",
"there",
"fail",
"(",
"\"",
"listener",
"shouldn",
"'",
"t",
"be",
"done",
"\"",
")",
";",
"}",
"/",
"/",
"no",
"retry",
"yet",
"list",
"<",
"capturing",
"transport",
"captured",
"request",
">",
"captured",
"requests",
"=",
"transport",
"get",
"captured",
"requests",
"by",
"target",
"node",
"and",
"clear",
"(",
")",
"get",
"(",
"replica",
"current",
"node",
"id",
"(",
")",
")",
";",
"assert",
"that",
"(",
"captured",
"requests",
",",
"null",
"value",
"(",
")",
")",
";",
"/",
"/",
"release",
"the",
"waiting",
"throw",
"exception",
"set",
"(",
"false",
")",
";",
"set",
"state",
"(",
"cluster",
"service",
",",
"state",
")",
";",
"captured",
"requests",
"=",
"transport",
"get",
"captured",
"requests",
"by",
"target",
"node",
"and",
"clear",
"(",
")",
"get",
"(",
"replica",
"current",
"node",
"id",
"(",
")",
")",
";",
"assert",
"that",
"(",
"captured",
"requests",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"assert",
"that",
"(",
"captured",
"requests",
"size",
"(",
")",
",",
"equal",
"to",
"(",
"1",
")",
")",
";",
"final",
"capturing",
"transport",
"captured",
"request",
"captured",
"request",
"=",
"captured",
"requests",
"get",
"(",
"0",
")",
";",
"assert",
"that",
"(",
"captured",
"request",
"action",
",",
"equal",
"to",
"(",
"\"",
"internal",
":",
"test",
"action",
"with",
"exceptions",
"[",
"r",
"]",
"\"",
")",
")",
";",
"assert",
"that",
"(",
"captured",
"request",
"request",
",",
"instance",
"of",
"(",
"transport",
"replication",
"action",
"concrete",
"replica",
"request",
"class",
")",
")",
";",
"assert",
"that",
"(",
"(",
"(",
"transport",
"replication",
"action",
"concrete",
"replica",
"request",
")",
"captured",
"request",
"request",
")",
"get",
"global",
"checkpoint",
"(",
")",
",",
"equal",
"to",
"(",
"checkpoint",
")",
")",
";",
"assert",
"that",
"(",
"(",
"(",
"transport",
"replication",
"action",
"concrete",
"replica",
"request",
")",
"captured",
"request",
"request",
")",
"get",
"max",
"seq",
"no",
"of",
"updates",
"or",
"deletes",
"(",
")",
",",
"equal",
"to",
"(",
"max",
"seq",
"no",
"of",
"updates",
"or",
"deletes",
")",
")",
";",
"assert",
"concrete",
"shard",
"request",
"(",
"captured",
"request",
"request",
",",
"request",
",",
"replica",
"allocation",
"id",
"(",
")",
")",
";",
"}"
] |
[
"returns",
"the",
"given",
"list",
"of",
"local",
"variables",
",",
"without",
"the",
"ones",
"that",
"aren",
"'",
"t",
"used"
] | [
"private",
"int",
"remove",
"unused",
"local",
"variables",
"(",
"local",
"variable",
"info",
"[",
"]",
"local",
"variable",
"infos",
",",
"int",
"local",
"variable",
"info",
"count",
",",
"int",
"max",
"locals",
")",
"{",
"/",
"/",
"overwrite",
"all",
"empty",
"local",
"variable",
"entries",
"/",
"/",
"do",
"keep",
"parameter",
"entries",
"int",
"new",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"local",
"variable",
"info",
"count",
";",
"index",
"+",
"+",
")",
"{",
"local",
"variable",
"info",
"local",
"variable",
"info",
"=",
"local",
"variable",
"infos",
"[",
"index",
"]",
";",
"if",
"(",
"local",
"variable",
"info",
"u",
"2index",
">",
"=",
"0",
"&",
"&",
"local",
"variable",
"info",
"u",
"2index",
"<",
"max",
"locals",
"&",
"&",
"(",
"local",
"variable",
"info",
"u",
"2start",
"p",
"c",
"=",
"=",
"0",
"|",
"|",
"local",
"variable",
"info",
"u",
"2length",
">",
"0",
")",
")",
"{",
"local",
"variable",
"infos",
"[",
"new",
"index",
"+",
"+",
"]",
"=",
"local",
"variable",
"infos",
"[",
"index",
"]",
";",
"}",
"}",
"/",
"/",
"clean",
"up",
"any",
"remaining",
"array",
"elements",
"arrays",
"fill",
"(",
"local",
"variable",
"infos",
",",
"new",
"index",
",",
"local",
"variable",
"info",
"count",
",",
"null",
")",
";",
"return",
"new",
"index",
";",
"}"
] |
[
"build",
"an",
"{",
"@",
"link",
"r",
"socket",
"requester",
"}",
"with",
"an",
"{",
"@",
"link",
"io",
"rsocket",
"loadbalance",
"loadbalance",
"r",
"socket",
"client",
"}",
"that",
"will",
"connect",
"to",
"one",
"of",
"the",
"given",
"targets",
"selected",
"through",
"the",
"given",
"{",
"@",
"link",
"io",
"rsocket",
"loadbalance",
"loadbalance",
"r",
"socket",
"client",
"}"
] | [
"r",
"socket",
"requester",
"transports",
"(",
"publisher",
"<",
"list",
"<",
"loadbalance",
"target",
">",
">",
"target",
"publisher",
",",
"loadbalance",
"strategy",
"loadbalance",
"strategy",
")",
";"
] |
[
"test",
"the",
"property",
"'",
"kind",
"'"
] | [
"public",
"void",
"kind",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"kind",
"}"
] |
[
"demand",
"creates",
"a",
"new",
"iterator",
"which",
"will",
"retry",
"all",
"has",
"nextnext",
"operations",
"through",
"the",
"invoker",
"supplied",
"in",
"the",
"constructor"
] | [
"public",
"iterator",
"<",
"t",
">",
"iterator",
"(",
")",
"{",
"return",
"new",
"retrying",
"iterator",
"(",
"source",
"iterator",
"(",
")",
")",
";",
"}"
] |
[
"returns",
"the",
"architecture",
"object",
"with",
"the",
"given",
"signature",
"returns",
"null",
"if",
"one",
"does",
"not",
"exist"
] | [
"public",
"final",
"static",
"dyld",
"architecture",
"get",
"architecture",
"(",
"string",
"signature",
")",
"{",
"for",
"(",
"dyld",
"architecture",
"architecture",
":",
"architectures",
")",
"{",
"if",
"(",
"architecture",
"get",
"signature",
"(",
")",
"equals",
"(",
"signature",
")",
")",
"{",
"return",
"architecture",
";",
"}",
"}",
"return",
"null",
";",
"}"
] |
[
"method",
"called",
"by",
"a",
"thread",
"to",
"release",
"the",
"lock"
] | [
"public",
"synchronized",
"void",
"release",
"(",
")",
"{",
"if",
"(",
"thread",
"current",
"thread",
"(",
")",
"=",
"=",
"owner",
")",
"{",
"owner",
"=",
"null",
";",
"notify",
"(",
")",
";",
"}",
"}"
] |
[
"predicate",
":",
"is",
"there",
"a",
"bound",
"dt",
"?"
] | [
"public",
"boolean",
"is",
"bound",
"to",
"d",
"t",
"(",
")",
"{",
"return",
"bound",
"d",
"t",
"is",
"present",
"(",
")",
";",
"}"
] |
[
"executes",
"a",
"privileged",
"operation",
"it",
"is",
"up",
"to",
"the",
"callers",
"to",
"ensure",
"that",
"each",
"privileged",
"operation",
"'",
"s",
"parameters",
"are",
"constructed",
"correctly",
"the",
"parameters",
"are",
"passed",
"verbatim",
"to",
"the",
"container",
"-",
"executor",
"binary"
] | [
"public",
"string",
"execute",
"privileged",
"operation",
"(",
"privileged",
"operation",
"operation",
",",
"boolean",
"grab",
"output",
")",
"throws",
"privileged",
"operation",
"exception",
"{",
"return",
"execute",
"privileged",
"operation",
"(",
"null",
",",
"operation",
",",
"null",
",",
"null",
",",
"grab",
"output",
",",
"false",
")",
";",
"}"
] |
[
"removes",
"the",
"cookie",
"with",
"given",
"path",
"and",
"name"
] | [
"public",
"void",
"remove",
"cookie",
"(",
"string",
"path",
",",
"string",
"name",
")",
"{",
"cookie",
"cookie",
"=",
"new",
"cookie",
"(",
"name",
",",
"\"",
"\"",
")",
";",
"cookie",
"set",
"path",
"(",
"path",
")",
";",
"cookie",
"set",
"max",
"age",
"(",
"0",
")",
";",
"response",
"add",
"cookie",
"(",
"cookie",
")",
";",
"}"
] |
[
"returns",
"a",
"new",
"metadata",
"snapshot",
"for",
"the",
"given",
"commit",
"if",
"the",
"given",
"commit",
"is",
"<",
"code",
">",
"null",
"<",
"code",
">",
"the",
"latest",
"commit",
"point",
"is",
"used",
"note",
"that",
"this",
"method",
"requires",
"the",
"caller",
"verify",
"it",
"has",
"the",
"right",
"to",
"access",
"the",
"store",
"and",
"no",
"concurrent",
"file",
"changes",
"are",
"happening",
"if",
"in",
"doubt",
",",
"you",
"probably",
"want",
"to",
"use",
"one",
"of",
"the",
"following",
":",
"{",
"@",
"link",
"#",
"read",
"metadata",
"snapshot",
"(",
"path",
",",
"shard",
"id",
",",
"node",
"environment",
"shard",
"locker",
",",
"logger",
")",
"}",
"to",
"read",
"a",
"meta",
"data",
"while",
"locking",
"{",
"@",
"link",
"index",
"shard",
"#",
"snapshot",
"store",
"metadata",
"(",
")",
"}",
"to",
"safely",
"read",
"from",
"an",
"existing",
"shard",
"{",
"@",
"link",
"index",
"shard",
"#",
"acquire",
"last",
"index",
"commit",
"(",
"boolean",
")",
"}",
"to",
"get",
"an",
"{",
"@",
"link",
"index",
"commit",
"}",
"which",
"is",
"safe",
"to",
"use",
"but",
"has",
"to",
"be",
"freed"
] | [
"public",
"metadata",
"snapshot",
"get",
"metadata",
"(",
"index",
"commit",
"commit",
",",
"boolean",
"lock",
"directory",
")",
"throws",
"i",
"o",
"exception",
"{",
"ensure",
"open",
"(",
")",
";",
"fail",
"if",
"corrupted",
"(",
")",
";",
"assert",
"lock",
"directory",
"?",
"commit",
"=",
"=",
"null",
":",
"true",
":",
"\"",
"iw",
"lock",
"should",
"not",
"be",
"obtained",
"if",
"there",
"is",
"a",
"commit",
"point",
"available",
"\"",
";",
"/",
"/",
"if",
"we",
"lock",
"the",
"directory",
"we",
"also",
"acquire",
"the",
"write",
"lock",
"since",
"that",
"makes",
"sure",
"that",
"nobody",
"else",
"tries",
"to",
"lock",
"the",
"iw",
"/",
"/",
"on",
"this",
"store",
"at",
"the",
"same",
"time",
"java",
"util",
"concurrent",
"locks",
"lock",
"lock",
"=",
"lock",
"directory",
"?",
"metadata",
"lock",
"write",
"lock",
"(",
")",
":",
"metadata",
"lock",
"read",
"lock",
"(",
")",
";",
"lock",
"lock",
"(",
")",
";",
"try",
"(",
"closeable",
"ignored",
"=",
"lock",
"directory",
"?",
"directory",
"obtain",
"lock",
"(",
"index",
"writer",
"write",
"lock",
"name",
")",
":",
"(",
")",
"-",
">",
"{",
"}",
")",
"{",
"return",
"new",
"metadata",
"snapshot",
"(",
"commit",
",",
"directory",
",",
"logger",
")",
";",
"}",
"catch",
"(",
"corrupt",
"index",
"exception",
"|",
"index",
"format",
"too",
"old",
"exception",
"|",
"index",
"format",
"too",
"new",
"exception",
"ex",
")",
"{",
"mark",
"store",
"corrupted",
"(",
"ex",
")",
";",
"throw",
"ex",
";",
"}",
"finally",
"{",
"lock",
"unlock",
"(",
")",
";",
"}",
"}"
] |
[
"retrieve",
"the",
"map",
"output",
"of",
"a",
"single",
"map",
"task",
"and",
"send",
"it",
"to",
"the",
"merger"
] | [
"private",
"boolean",
"copy",
"map",
"output",
"(",
"task",
"attempt",
"i",
"d",
"map",
"task",
"id",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"figure",
"out",
"where",
"the",
"map",
"task",
"stored",
"its",
"output",
"path",
"map",
"output",
"file",
"name",
"=",
"local",
"map",
"files",
"get",
"(",
"map",
"task",
"id",
")",
"get",
"output",
"file",
"(",
")",
";",
"path",
"index",
"file",
"name",
"=",
"map",
"output",
"file",
"name",
"suffix",
"(",
"\"",
"index",
"\"",
")",
";",
"/",
"/",
"read",
"its",
"index",
"to",
"determine",
"the",
"location",
"of",
"our",
"split",
"/",
"/",
"and",
"its",
"size",
"spill",
"record",
"sr",
"=",
"new",
"spill",
"record",
"(",
"index",
"file",
"name",
",",
"job",
")",
";",
"index",
"record",
"ir",
"=",
"sr",
"get",
"index",
"(",
"reduce",
")",
";",
"long",
"compressed",
"length",
"=",
"ir",
"part",
"length",
";",
"long",
"decompressed",
"length",
"=",
"ir",
"raw",
"length",
";",
"compressed",
"length",
"-",
"=",
"crypto",
"utils",
"crypto",
"padding",
"(",
"job",
")",
";",
"decompressed",
"length",
"-",
"=",
"crypto",
"utils",
"crypto",
"padding",
"(",
"job",
")",
";",
"/",
"/",
"get",
"the",
"location",
"for",
"the",
"map",
"output",
"-",
"either",
"in",
"-",
"memory",
"or",
"on",
"-",
"disk",
"map",
"output",
"<",
"k",
",",
"v",
">",
"map",
"output",
"=",
"merger",
"reserve",
"(",
"map",
"task",
"id",
",",
"decompressed",
"length",
",",
"id",
")",
";",
"/",
"/",
"check",
"if",
"we",
"can",
"shuffle",
"*",
"now",
"*",
"if",
"(",
"map",
"output",
"=",
"=",
"null",
")",
"{",
"log",
"info",
"(",
"\"",
"fetcher",
"#",
"\"",
"+",
"id",
"+",
"\"",
"-",
"merge",
"manager",
"returned",
"status",
"wait",
"\"",
")",
";",
"return",
"false",
";",
"}",
"/",
"/",
"go",
"!",
"log",
"info",
"(",
"\"",
"localfetcher",
"#",
"\"",
"+",
"id",
"+",
"\"",
"about",
"to",
"shuffle",
"output",
"of",
"map",
"\"",
"+",
"map",
"output",
"get",
"map",
"id",
"(",
")",
"+",
"\"",
"decomp",
":",
"\"",
"+",
"decompressed",
"length",
"+",
"\"",
"len",
":",
"\"",
"+",
"compressed",
"length",
"+",
"\"",
"to",
"\"",
"+",
"map",
"output",
"get",
"description",
"(",
")",
")",
";",
"/",
"/",
"now",
"read",
"the",
"file",
",",
"seek",
"to",
"the",
"appropriate",
"section",
",",
"and",
"send",
"it",
"file",
"system",
"local",
"fs",
"=",
"file",
"system",
"get",
"local",
"(",
"job",
")",
"get",
"raw",
"(",
")",
";",
"f",
"s",
"data",
"input",
"stream",
"in",
"stream",
"=",
"local",
"fs",
"open",
"(",
"map",
"output",
"file",
"name",
")",
";",
"try",
"{",
"in",
"stream",
"=",
"crypto",
"utils",
"wrap",
"if",
"necessary",
"(",
"job",
",",
"in",
"stream",
")",
";",
"in",
"stream",
"seek",
"(",
"ir",
"start",
"offset",
"+",
"crypto",
"utils",
"crypto",
"padding",
"(",
"job",
")",
")",
";",
"map",
"output",
"shuffle",
"(",
"localhost",
",",
"in",
"stream",
",",
"compressed",
"length",
",",
"decompressed",
"length",
",",
"metrics",
",",
"reporter",
")",
";",
"}",
"finally",
"{",
"i",
"o",
"utils",
"cleanup",
"with",
"logger",
"(",
"log",
",",
"in",
"stream",
")",
";",
"}",
"scheduler",
"copy",
"succeeded",
"(",
"map",
"task",
"id",
",",
"localhost",
",",
"compressed",
"length",
",",
"0",
",",
"0",
",",
"map",
"output",
")",
";",
"return",
"true",
";",
"/",
"/",
"successful",
"fetch",
"}"
] |
[
"tests",
"that",
"sharding",
"is",
"stable",
"for",
"the",
"given",
"filters",
",",
"regardless",
"of",
"the",
"ordering",
"of",
"the",
"descriptions",
"this",
"is",
"useful",
"for",
"verifying",
"that",
"sharding",
"works",
"with",
"self",
"-",
"randomizing",
"test",
"suites",
",",
"and",
"a",
"requirement",
"of",
"all",
"test",
"sharding",
"functions"
] | [
"protected",
"static",
"void",
"assert",
"sharding",
"is",
"stable",
"(",
"list",
"<",
"filter",
">",
"filters",
",",
"list",
"<",
"description",
">",
"descriptions",
")",
"{",
"map",
"<",
"filter",
",",
"list",
"<",
"description",
">",
">",
"run",
"1",
"=",
"simulate",
"test",
"run",
"(",
"filters",
",",
"descriptions",
")",
";",
"map",
"<",
"filter",
",",
"list",
"<",
"description",
">",
">",
"run",
"2",
"=",
"simulate",
"test",
"run",
"(",
"filters",
",",
"descriptions",
")",
";",
"assert",
"that",
"(",
"run",
"2",
")",
"is",
"equal",
"to",
"(",
"run",
"1",
")",
";",
"map",
"<",
"filter",
",",
"list",
"<",
"description",
">",
">",
"randomized",
"run",
"1",
"=",
"simulate",
"self",
"randomizing",
"test",
"run",
"(",
"filters",
",",
"descriptions",
")",
";",
"map",
"<",
"filter",
",",
"list",
"<",
"description",
">",
">",
"randomized",
"run",
"2",
"=",
"simulate",
"self",
"randomizing",
"test",
"run",
"(",
"filters",
",",
"descriptions",
")",
";",
"assert",
"that",
"(",
"randomized",
"run",
"2",
")",
"is",
"equal",
"to",
"(",
"randomized",
"run",
"1",
")",
";",
"}"
] |
[
"adds",
"the",
"deprecated",
"key",
"to",
"the",
"global",
"deprecation",
"map",
"when",
"no",
"custom",
"message",
"is",
"provided",
"it",
"does",
"not",
"override",
"any",
"existing",
"entries",
"in",
"the",
"deprecation",
"map",
"this",
"is",
"to",
"be",
"used",
"only",
"by",
"the",
"developers",
"in",
"order",
"to",
"add",
"deprecation",
"of",
"keys",
",",
"and",
"attempts",
"to",
"call",
"this",
"method",
"after",
"loading",
"resources",
"once",
",",
"would",
"lead",
"to",
"<",
"tt",
">",
"unsupported",
"operation",
"exception",
"<",
"tt",
">",
"if",
"you",
"have",
"multiple",
"deprecation",
"entries",
"to",
"add",
",",
"it",
"is",
"more",
"efficient",
"to",
"use",
"#",
"add",
"deprecations",
"(",
"deprecation",
"delta",
"[",
"]",
"deltas",
")",
"instead"
] | [
"public",
"static",
"void",
"add",
"deprecation",
"(",
"string",
"key",
",",
"string",
"new",
"key",
")",
"{",
"add",
"deprecation",
"(",
"key",
",",
"new",
"string",
"[",
"]",
"{",
"new",
"key",
"}",
",",
"null",
")",
";",
"}"
] |
[
"aborts",
"the",
"matching",
"process",
"this",
"extra",
"abort",
"method",
"is",
"supplied",
",",
"because",
"a",
"significant",
"time",
"may",
"pass",
"while",
"calling",
"the",
"match",
"stub",
"with",
"the",
"cross",
"product",
"of",
"all",
"values",
"that",
"share",
"the",
"same",
"key",
"a",
"call",
"to",
"this",
"abort",
"method",
"signals",
"an",
"interrupt",
"to",
"that",
"procedure"
] | [
"void",
"abort",
"(",
")",
";"
] |
[
"indirection",
"to",
"create",
"links",
"so",
"we",
"can",
"test",
"file",
"systems",
"that",
"do",
"not",
"support",
"link",
"creation",
"for",
"example",
",",
"java",
"file",
"system",
"test",
"overrides",
"this",
"method",
"and",
"creates",
"the",
"link",
"with",
"an",
"alternate",
"file",
"system"
] | [
"protected",
"void",
"create",
"symbolic",
"link",
"(",
"path",
"link",
",",
"path",
"target",
")",
"throws",
"i",
"o",
"exception",
"{",
"create",
"symbolic",
"link",
"(",
"link",
",",
"target",
"as",
"fragment",
"(",
")",
")",
";",
"}"
] |
[
"decodes",
"a",
"record",
"from",
"the",
"information",
"decoded",
"so",
"far",
"by",
"{",
"@",
"link",
"#",
"decode",
"record",
"(",
"byte",
"buf",
")",
"}"
] | [
"protected",
"dns",
"record",
"decode",
"record",
"(",
"string",
"name",
",",
"dns",
"record",
"type",
"type",
",",
"int",
"dns",
"class",
",",
"long",
"time",
"to",
"live",
",",
"byte",
"buf",
"in",
",",
"int",
"offset",
",",
"int",
"length",
")",
"throws",
"exception",
"{",
"/",
"/",
"dns",
"message",
"compression",
"means",
"that",
"domain",
"names",
"may",
"contain",
"\"",
"pointers",
"\"",
"to",
"other",
"positions",
"in",
"the",
"packet",
"/",
"/",
"to",
"build",
"a",
"full",
"message",
"this",
"means",
"the",
"indexes",
"are",
"meaningful",
"and",
"we",
"need",
"the",
"ability",
"to",
"reference",
"the",
"/",
"/",
"indexes",
"un",
"-",
"obstructed",
",",
"and",
"thus",
"we",
"cannot",
"use",
"a",
"slice",
"here",
"/",
"/",
"see",
"https",
":",
"/",
"/",
"www",
"ietf",
"org",
"/",
"rfc",
"/",
"rfc",
"1",
"0",
"3",
"5",
"[",
"4",
"1",
"4",
"message",
"compression",
"]",
"if",
"(",
"type",
"=",
"=",
"dns",
"record",
"type",
"ptr",
")",
"{",
"return",
"new",
"default",
"dns",
"ptr",
"record",
"(",
"name",
",",
"dns",
"class",
",",
"time",
"to",
"live",
",",
"decode",
"name",
"0",
"(",
"in",
"duplicate",
"(",
")",
"set",
"index",
"(",
"offset",
",",
"offset",
"+",
"length",
")",
")",
")",
";",
"}",
"if",
"(",
"type",
"=",
"=",
"dns",
"record",
"type",
"cname",
"|",
"|",
"type",
"=",
"=",
"dns",
"record",
"type",
"ns",
")",
"{",
"return",
"new",
"default",
"dns",
"raw",
"record",
"(",
"name",
",",
"type",
",",
"dns",
"class",
",",
"time",
"to",
"live",
",",
"dns",
"codec",
"util",
"decompress",
"domain",
"name",
"(",
"in",
"duplicate",
"(",
")",
"set",
"index",
"(",
"offset",
",",
"offset",
"+",
"length",
")",
")",
")",
";",
"}",
"return",
"new",
"default",
"dns",
"raw",
"record",
"(",
"name",
",",
"type",
",",
"dns",
"class",
",",
"time",
"to",
"live",
",",
"in",
"retained",
"duplicate",
"(",
")",
"set",
"index",
"(",
"offset",
",",
"offset",
"+",
"length",
")",
")",
";",
"}"
] |
[
"api",
"implementation",
"to",
"delete",
"a",
"blob",
"in",
"the",
"back",
"end",
"azure",
"storage"
] | [
"public",
"boolean",
"delete",
"(",
"string",
"key",
",",
"self",
"renewing",
"lease",
"lease",
")",
"throws",
"i",
"o",
"exception",
"{",
"try",
"{",
"if",
"(",
"check",
"container",
"(",
"container",
"access",
"type",
"read",
"then",
"write",
")",
"=",
"=",
"container",
"state",
"doesnt",
"exist",
")",
"{",
"/",
"/",
"container",
"doesn",
"'",
"t",
"exist",
",",
"no",
"need",
"to",
"do",
"anything",
"return",
"true",
";",
"}",
"/",
"/",
"get",
"the",
"blob",
"reference",
"and",
"delete",
"it",
"cloud",
"blob",
"wrapper",
"blob",
"=",
"get",
"blob",
"reference",
"(",
"key",
")",
";",
"safe",
"delete",
"(",
"blob",
",",
"lease",
")",
";",
"return",
"true",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"if",
"(",
"e",
"instanceof",
"storage",
"exception",
"&",
"&",
"native",
"azure",
"file",
"system",
"helper",
"is",
"file",
"not",
"found",
"exception",
"(",
"(",
"storage",
"exception",
")",
"e",
")",
")",
"{",
"/",
"/",
"the",
"file",
"or",
"directory",
"does",
"not",
"exist",
"return",
"false",
";",
"}",
"throw",
"new",
"azure",
"exception",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"recover",
"from",
"a",
"folder",
"rename",
"failure",
"by",
"redoing",
"the",
"intended",
"work",
",",
"as",
"recorded",
"in",
"the",
"-",
"rename",
"pending",
"json",
"file"
] | [
"public",
"void",
"redo",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"!",
"committed",
")",
"{",
"/",
"/",
"nothing",
"to",
"do",
"the",
"-",
"redo",
"pending",
"json",
"file",
"should",
"have",
"already",
"been",
"/",
"/",
"deleted",
"return",
";",
"}",
"/",
"/",
"try",
"to",
"get",
"a",
"lease",
"on",
"source",
"folder",
"to",
"block",
"concurrent",
"access",
"to",
"it",
"/",
"/",
"it",
"may",
"fail",
"if",
"the",
"folder",
"is",
"already",
"gone",
"we",
"don",
"'",
"t",
"check",
"if",
"the",
"/",
"/",
"source",
"exists",
"explicitly",
"because",
"that",
"could",
"recursively",
"trigger",
"redo",
"/",
"/",
"and",
"give",
"an",
"infinite",
"recursion",
"self",
"renewing",
"lease",
"lease",
"=",
"null",
";",
"boolean",
"source",
"folder",
"gone",
"=",
"false",
";",
"try",
"{",
"lease",
"=",
"fs",
"lease",
"source",
"folder",
"(",
"src",
"key",
")",
";",
"}",
"catch",
"(",
"azure",
"exception",
"e",
")",
"{",
"/",
"/",
"if",
"the",
"source",
"folder",
"was",
"not",
"found",
"then",
"somebody",
"probably",
"/",
"/",
"raced",
"with",
"us",
"and",
"finished",
"the",
"rename",
"first",
",",
"or",
"the",
"/",
"/",
"first",
"rename",
"failed",
"right",
"before",
"deleting",
"the",
"rename",
"pending",
"/",
"/",
"file",
"string",
"error",
"code",
"=",
"\"",
"\"",
";",
"try",
"{",
"storage",
"exception",
"se",
"=",
"(",
"storage",
"exception",
")",
"e",
"get",
"cause",
"(",
")",
";",
"error",
"code",
"=",
"se",
"get",
"error",
"code",
"(",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
"2",
")",
"{",
";",
"/",
"/",
"do",
"nothing",
"-",
"-",
"could",
"not",
"get",
"error",
"code",
"}",
"if",
"(",
"error",
"code",
"equals",
"(",
"\"",
"blob",
"not",
"found",
"\"",
")",
")",
"{",
"source",
"folder",
"gone",
"=",
"true",
";",
"}",
"else",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"unexpected",
"error",
"when",
"trying",
"to",
"lease",
"source",
"folder",
"name",
"during",
"\"",
"+",
"\"",
"folder",
"rename",
"redo",
"\"",
",",
"e",
")",
";",
"}",
"}",
"if",
"(",
"!",
"source",
"folder",
"gone",
")",
"{",
"/",
"/",
"make",
"sure",
"the",
"target",
"folder",
"exists",
"path",
"dst",
"=",
"full",
"path",
"(",
"dst",
"key",
")",
";",
"if",
"(",
"!",
"fs",
"exists",
"internal",
"(",
"dst",
")",
")",
"{",
"fs",
"mkdirs",
"(",
"dst",
")",
";",
"}",
"/",
"/",
"for",
"each",
"file",
"inside",
"the",
"folder",
"to",
"be",
"renamed",
",",
"/",
"/",
"make",
"sure",
"it",
"has",
"been",
"renamed",
"for",
"(",
"string",
"file",
"name",
":",
"file",
"strings",
")",
"{",
"finish",
"single",
"file",
"rename",
"(",
"file",
"name",
")",
";",
"}",
"/",
"/",
"remove",
"the",
"source",
"folder",
"don",
"'",
"t",
"check",
"explicitly",
"if",
"it",
"exists",
",",
"/",
"/",
"to",
"avoid",
"triggering",
"redo",
"recursively",
"try",
"{",
"/",
"/",
"rename",
"the",
"source",
"folder",
"0",
"-",
"byte",
"root",
"file",
"/",
"/",
"as",
"destination",
"folder",
"0",
"-",
"byte",
"root",
"file",
"file",
"metadata",
"src",
"meta",
"data",
"=",
"this",
"get",
"source",
"metadata",
"(",
")",
";",
"if",
"(",
"src",
"meta",
"data",
"get",
"blob",
"materialization",
"(",
")",
"=",
"=",
"blob",
"materialization",
"explicit",
")",
"{",
"/",
"/",
"we",
"already",
"have",
"a",
"lease",
"so",
"let",
"'",
"s",
"just",
"rename",
"the",
"source",
"blob",
"/",
"/",
"as",
"destination",
"blob",
"under",
"same",
"lease",
"fs",
"get",
"store",
"interface",
"(",
")",
"rename",
"(",
"this",
"get",
"src",
"key",
"(",
")",
",",
"this",
"get",
"dst",
"key",
"(",
")",
",",
"false",
",",
"lease",
")",
";",
"}",
"/",
"/",
"now",
"we",
"can",
"safely",
"delete",
"the",
"source",
"folder",
"fs",
"get",
"store",
"interface",
"(",
")",
"delete",
"(",
"src",
"key",
",",
"lease",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"log",
"info",
"(",
"\"",
"unable",
"to",
"delete",
"source",
"folder",
"during",
"folder",
"rename",
"redo",
"\"",
"+",
"\"",
"if",
"the",
"source",
"folder",
"is",
"already",
"gone",
",",
"this",
"is",
"not",
"an",
"error",
"\"",
"+",
"\"",
"condition",
"continuing",
"with",
"redo",
"\"",
",",
"e",
")",
";",
"}",
"/",
"/",
"update",
"the",
"last",
"-",
"modified",
"time",
"of",
"the",
"parent",
"folders",
"of",
"both",
"source",
"/",
"/",
"and",
"destination",
"fs",
"update",
"parent",
"folder",
"last",
"modified",
"time",
"(",
"src",
"key",
")",
";",
"fs",
"update",
"parent",
"folder",
"last",
"modified",
"time",
"(",
"dst",
"key",
")",
";",
"}",
"/",
"/",
"remove",
"the",
"-",
"rename",
"pending",
"json",
"file",
"fs",
"delete",
"(",
"get",
"rename",
"pending",
"file",
"path",
"(",
")",
",",
"false",
")",
";",
"}"
] |
[
"removes",
"an",
"applier",
"of",
"updated",
"cluster",
"states"
] | [
"public",
"void",
"remove",
"applier",
"(",
"cluster",
"state",
"applier",
"applier",
")",
"{",
"normal",
"priority",
"state",
"appliers",
"remove",
"(",
"applier",
")",
";",
"high",
"priority",
"state",
"appliers",
"remove",
"(",
"applier",
")",
";",
"low",
"priority",
"state",
"appliers",
"remove",
"(",
"applier",
")",
";",
"}"
] |
[
"set",
"the",
"core",
"pool",
"size",
"of",
"the",
"thread",
"pool",
"executor",
"note",
":",
"the",
"core",
"pool",
"size",
"is",
"effectively",
"the",
"max",
"pool",
"size",
"when",
"an",
"unbounded",
"{",
"@",
"link",
"#",
"queue",
"capacity",
"(",
"int",
")",
"queue",
"capacity",
"}",
"is",
"configured",
"(",
"the",
"default",
")",
"this",
"is",
"essentially",
"the",
"\"",
"unbounded",
"queues",
"\"",
"strategy",
"as",
"explained",
"in",
"{",
"@",
"link",
"java",
"util",
"concurrent",
"thread",
"pool",
"executor",
"thread",
"pool",
"executor",
"}",
"when",
"this",
"strategy",
"is",
"used",
",",
"the",
"{",
"@",
"link",
"#",
"max",
"pool",
"size",
"(",
"int",
")",
"max",
"pool",
"size",
"}",
"is",
"ignored",
"by",
"default",
"this",
"is",
"set",
"to",
"twice",
"the",
"value",
"of",
"{",
"@",
"link",
"runtime",
"#",
"available",
"processors",
"(",
")",
"}",
"in",
"an",
"application",
"where",
"tasks",
"do",
"not",
"block",
"frequently",
",",
"the",
"number",
"should",
"be",
"closer",
"to",
"or",
"equal",
"to",
"the",
"number",
"of",
"available",
"c",
"p",
"uscores"
] | [
"public",
"task",
"executor",
"registration",
"core",
"pool",
"size",
"(",
"int",
"core",
"pool",
"size",
")",
"{",
"this",
"core",
"pool",
"size",
"=",
"core",
"pool",
"size",
";",
"return",
"this",
";",
"}"
] |
[
"whether",
"the",
"{",
"@",
"code",
"accept",
"-",
"charset",
"}",
"header",
"should",
"be",
"written",
"to",
"any",
"outgoing",
"request",
"sourced",
"from",
"the",
"value",
"of",
"{",
"@",
"link",
"charset",
"#",
"available",
"charsets",
"(",
")",
"}",
"the",
"behavior",
"is",
"suppressed",
"if",
"the",
"header",
"has",
"already",
"been",
"set",
"as",
"of",
"5",
"2",
",",
"by",
"default",
"is",
"set",
"to",
"{",
"@",
"code",
"false",
"}"
] | [
"public",
"void",
"set",
"write",
"accept",
"charset",
"(",
"boolean",
"write",
"accept",
"charset",
")",
"{",
"this",
"write",
"accept",
"charset",
"=",
"write",
"accept",
"charset",
";",
"}"
] |
[
"factory",
"method",
"for",
"constructing",
"params"
] | [
"public",
"static",
"params",
"from",
"json",
"(",
"string",
"json",
")",
"{",
"params",
"params",
"=",
"new",
"params",
"(",
")",
";",
"params",
"load",
"json",
"(",
"json",
")",
";",
"return",
"params",
";",
"}"
] |
[
"add",
"a",
"single",
"domain",
"into",
"the",
"existing",
"domain",
"list"
] | [
"public",
"void",
"add",
"domain",
"(",
"timeline",
"domain",
"domain",
")",
"{",
"domains",
"add",
"(",
"domain",
")",
";",
"}"
] |
[
"set",
"the",
"maximum",
"motor",
"torque",
",",
"usually",
"in",
"n",
"-",
"m"
] | [
"public",
"void",
"set",
"max",
"motor",
"torque",
"(",
"float",
"torque",
")",
"{",
"jni",
"set",
"max",
"motor",
"torque",
"(",
"addr",
",",
"torque",
")",
";",
"}"
] |
[
"returns",
"the",
"class",
"associated",
"with",
"the",
"given",
"key",
"as",
"a",
"string"
] | [
"public",
"<",
"t",
">",
"class",
"<",
"t",
">",
"get",
"class",
"(",
"string",
"key",
",",
"class",
"<",
"?",
"extends",
"t",
">",
"default",
"value",
",",
"class",
"loader",
"class",
"loader",
")",
"throws",
"class",
"not",
"found",
"exception",
"{",
"optional",
"<",
"object",
">",
"o",
"=",
"get",
"raw",
"value",
"(",
"key",
")",
";",
"if",
"(",
"!",
"o",
"is",
"present",
"(",
")",
")",
"{",
"return",
"(",
"class",
"<",
"t",
">",
")",
"default",
"value",
";",
"}",
"if",
"(",
"o",
"get",
"(",
")",
"get",
"class",
"(",
")",
"=",
"=",
"string",
"class",
")",
"{",
"return",
"(",
"class",
"<",
"t",
">",
")",
"class",
"for",
"name",
"(",
"(",
"string",
")",
"o",
"get",
"(",
")",
",",
"true",
",",
"class",
"loader",
")",
";",
"}",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"configuration",
"cannot",
"evaluate",
"object",
"of",
"class",
"\"",
"+",
"o",
"get",
"(",
")",
"get",
"class",
"(",
")",
"+",
"\"",
"as",
"a",
"class",
"name",
"\"",
")",
";",
"}"
] |
[
"returns",
"the",
"platform",
"preferred",
"implementation",
"of",
"a",
"map",
"based",
"on",
"a",
"hash",
"table"
] | [
"static",
"<",
"k",
",",
"v",
">",
"map",
"<",
"k",
",",
"v",
">",
"new",
"hash",
"map",
"with",
"expected",
"size",
"(",
"int",
"expected",
"size",
")",
"{",
"return",
"compact",
"hash",
"map",
"create",
"with",
"expected",
"size",
"(",
"expected",
"size",
")",
";",
"}"
] |
[
"creates",
"an",
"event",
"key",
",",
"serializing",
"entity",
"entry",
"prefix",
"+",
"entity",
"type",
"+",
"revstarttime",
"+",
"entity",
"id",
"+",
"events",
"column",
"+",
"reveventtimestamp",
"+",
"event",
"type"
] | [
"private",
"static",
"byte",
"[",
"]",
"create",
"entity",
"event",
"key",
"(",
"string",
"entity",
"id",
",",
"string",
"entity",
"type",
",",
"byte",
"[",
"]",
"rev",
"start",
"time",
",",
"byte",
"[",
"]",
"rev",
"event",
"timestamp",
",",
"string",
"event",
"type",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"key",
"builder",
"new",
"instance",
"(",
")",
"add",
"(",
"entity",
"entry",
"prefix",
")",
"add",
"(",
"entity",
"type",
")",
"add",
"(",
"rev",
"start",
"time",
")",
"add",
"(",
"entity",
"id",
")",
"add",
"(",
"events",
"column",
")",
"add",
"(",
"rev",
"event",
"timestamp",
")",
"add",
"(",
"event",
"type",
")",
"get",
"bytes",
"(",
")",
";",
"}"
] |
[
"returns",
"the",
"debug",
"parser",
"used",
"by",
"this",
"debug",
"directory"
] | [
"public",
"debug",
"directory",
"parser",
"get",
"parser",
"(",
")",
"{",
"return",
"parser",
";",
"}"
] |
[
"builds",
"the",
"basic",
"format",
"selection",
"panel"
] | [
"private",
"j",
"panel",
"build",
"format",
"panel",
"(",
")",
"{",
"j",
"panel",
"format",
"panel",
"=",
"new",
"j",
"panel",
"(",
")",
";",
"format",
"panel",
"set",
"border",
"(",
"border",
"factory",
"create",
"titled",
"border",
"(",
"\"",
"format",
"\"",
")",
")",
";",
"format",
"panel",
"set",
"layout",
"(",
"new",
"grid",
"layout",
"(",
"0",
",",
"1",
")",
")",
";",
"button",
"group",
"format",
"group",
"=",
"new",
"button",
"group",
"(",
")",
";",
"action",
"listener",
"format",
"button",
"listener",
"=",
"ev",
"-",
">",
"{",
"string",
"format",
"name",
"=",
"(",
"(",
"j",
"radio",
"button",
")",
"ev",
"get",
"source",
"(",
")",
")",
"get",
"text",
"(",
")",
";",
"current",
"format",
"=",
"find",
"format",
"(",
"format",
"name",
")",
";",
"format",
"options",
"layout",
"show",
"(",
"format",
"options",
"panel",
",",
"current",
"format",
"get",
"name",
"(",
")",
")",
";",
"update",
"display",
"(",
")",
";",
"}",
";",
"for",
"(",
"search",
"format",
"element",
":",
"all",
"formats",
")",
"{",
"g",
"radio",
"button",
"format",
"button",
"=",
"new",
"g",
"radio",
"button",
"(",
"element",
"get",
"name",
"(",
")",
",",
"true",
")",
";",
"format",
"button",
"set",
"tool",
"tip",
"text",
"(",
"element",
"get",
"tool",
"tip",
"(",
")",
")",
";",
"format",
"group",
"add",
"(",
"format",
"button",
")",
";",
"format",
"button",
"add",
"action",
"listener",
"(",
"format",
"button",
"listener",
")",
";",
"format",
"panel",
"add",
"(",
"format",
"button",
")",
";",
"if",
"(",
"element",
"get",
"name",
"(",
")",
"equals",
"(",
"\"",
"binary",
"\"",
")",
"&",
"&",
"is",
"mnemonic",
")",
"{",
"format",
"button",
"set",
"selected",
"(",
"true",
")",
";",
"current",
"format",
"=",
"element",
";",
"}",
"}",
"return",
"format",
"panel",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"array",
"item",
"'"
] | [
"public",
"void",
"array",
"item",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"array",
"item",
"}"
] |
[
"for",
"testing",
"only",
",",
"to",
"verify",
"that",
"maps",
"are",
"cleared",
"after",
"responses",
"are",
"reaped"
] | [
"boolean",
"no",
"outstanding",
"requests",
"(",
")",
"{",
"return",
"response",
"checker",
"is",
"empty",
"(",
")",
"&",
"&",
"worker",
"process",
"response",
"is",
"empty",
"(",
")",
";",
"}"
] |
[
"cancels",
"the",
"subscription",
"set",
"via",
"{",
"@",
"link",
"#",
"on",
"subscribe",
"(",
"subscription",
")",
"}",
"or",
"makes",
"sure",
"a",
"{",
"@",
"link",
"subscription",
"}",
"set",
"asynchronously",
"(",
"later",
")",
"is",
"cancelled",
"immediately",
"this",
"method",
"is",
"thread",
"-",
"safe",
"and",
"can",
"be",
"exposed",
"as",
"a",
"public",
"api"
] | [
"protected",
"final",
"void",
"cancel",
"(",
")",
"{",
"dispose",
"(",
")",
";",
"}"
] |
[
"number",
"of",
"failures",
"that",
"have",
"occurred"
] | [
"public",
"long",
"get",
"search",
"failures",
"(",
")",
"{",
"return",
"search",
"failures",
";",
"}"
] |
[
"get",
"the",
"underlying",
"adapter",
"built",
"by",
"this",
"controller",
"use",
"this",
"to",
"get",
"the",
"adapter",
"to",
"set",
"on",
"a",
"recycler",
"view",
",",
"or",
"to",
"get",
"information",
"about",
"models",
"currently",
"in",
"use"
] | [
"public",
"epoxy",
"controller",
"adapter",
"get",
"adapter",
"(",
")",
"{",
"return",
"adapter",
";",
"}"
] |
[
"customize",
"nacos",
"registration"
] | [
"void",
"customize",
"(",
"nacos",
"registration",
"registration",
")",
";"
] |
[
"return",
"the",
"matrix",
"composed",
"of",
"the",
"absolute",
"values",
"of",
"all",
"elements"
] | [
"public",
"final",
"static",
"mat",
"2",
"2",
"abs",
"(",
"final",
"mat",
"2",
"2",
"r",
")",
"{",
"return",
"r",
"abs",
"(",
")",
";",
"}"
] |
[
"visit",
"a",
"parse",
"tree",
"produced",
"by",
"{",
"@",
"link",
"painless",
"parser",
"#",
"trap",
"}"
] | [
"t",
"visit",
"trap",
"(",
"painless",
"parser",
"trap",
"context",
"ctx",
")",
";"
] |
[
"returns",
"the",
"value",
"of",
"the",
"given",
"step",
"of",
"this",
"path"
] | [
"public",
"int",
"get",
"step",
"(",
"final",
"int",
"index",
")",
"{",
"/",
"/",
"returns",
"the",
"type",
"path",
"kind",
"of",
"the",
"path",
"element",
"of",
"the",
"given",
"index",
"return",
"type",
"path",
"container",
"[",
"type",
"path",
"offset",
"+",
"2",
"*",
"index",
"+",
"1",
"]",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"color",
"'"
] | [
"public",
"void",
"color",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"color",
"}"
] |
[
"get",
"prefix",
"string"
] | [
"public",
"string",
"get",
"prefix",
"string",
"(",
")",
"{",
"return",
"prefix",
"string",
";",
"}"
] |
[
"note",
":",
"this",
"is",
"a",
"jdk8",
"interfacemethod",
"due",
"to",
"backwards",
"compatibility",
"reasons",
"it",
"'",
"s",
"not",
"possible",
"to",
"slap",
"the",
"{",
"@",
"code",
"@",
"override",
"}",
"annotation",
"onto",
"this",
"method"
] | [
"public",
"boolean",
"is",
"destroyed",
"(",
")",
"{",
"return",
"ref",
"cnt",
"(",
")",
"=",
"=",
"0",
";",
"}"
] |
[
"returns",
"the",
"key",
"for",
"the",
"base",
"configured",
"target",
"for",
"this",
"aspect"
] | [
"public",
"configured",
"target",
"key",
"get",
"base",
"configured",
"target",
"key",
"(",
")",
"{",
"return",
"base",
"configured",
"target",
"key",
";",
"}"
] |
[
"creates",
"a",
"{",
"@",
"link",
"source",
"function",
"}",
"instance"
] | [
"source",
"function",
"<",
"row",
"data",
">",
"create",
"source",
"function",
"(",
")",
";"
] |
[
"wraps",
"{",
"@",
"link",
"extension",
"finder",
"}",
"into",
"{",
"@",
"link",
"extension",
"component",
"set",
"}"
] | [
"public",
"static",
"extension",
"component",
"set",
"all",
"of",
"(",
"final",
"extension",
"finder",
"f",
")",
"{",
"return",
"new",
"extension",
"component",
"set",
"(",
")",
"{",
"@",
"override",
"public",
"<",
"t",
">",
"collection",
"<",
"extension",
"component",
"<",
"t",
">",
">",
"find",
"(",
"class",
"<",
"t",
">",
"type",
")",
"{",
"return",
"f",
"find",
"(",
"type",
",",
"hudson",
"get",
"instance",
"(",
")",
")",
";",
"}",
"}",
";",
"}"
] |
[
"applies",
"all",
"deferred",
"service",
"names",
"to",
"all",
"input",
"templates"
] | [
"flat",
"mapper",
"<",
"list",
"<",
"string",
">",
",",
"map",
"<",
"string",
",",
"long",
">",
">",
"new",
"flat",
"mapper",
"(",
"list",
"<",
"input",
">",
"input",
"templates",
")",
"{",
"return",
"new",
"flat",
"map",
"services",
"to",
"inputs",
"(",
"input",
"templates",
")",
";",
"}"
] |
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
] | [
"private",
"static",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
] |
[
"return",
"the",
"cookie",
"value",
"or",
"an",
"empty",
"string",
"(",
"never",
"{",
"@",
"code",
"null",
"}",
")"
] | [
"public",
"string",
"get",
"value",
"(",
")",
"{",
"return",
"this",
"value",
";",
"}"
] |
[
"{",
"@",
"inherit",
"doc",
"}",
"the",
"default",
"implementation",
"does",
"nothing"
] | [
"@",
"override",
"public",
"void",
"enter",
"pattern",
"(",
"sql",
"base",
"parser",
"pattern",
"context",
"ctx",
")",
"{",
"}"
] |
[
"test",
"client",
"command",
"line",
"options",
"does",
"not",
"validate",
"server",
"behavior"
] | [
"public",
"void",
"test",
"command",
"options",
"(",
")",
"throws",
"exception",
"{",
"final",
"string",
"class",
"name",
"=",
"this",
"get",
"class",
"(",
")",
"get",
"name",
"(",
")",
";",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"foo",
"\"",
"}",
")",
")",
";",
"/",
"/",
"fail",
"due",
"to",
"insufficient",
"number",
"of",
"arguments",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"}",
")",
")",
";",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
"}",
")",
")",
";",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"setlevel",
"\"",
"}",
")",
")",
";",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
"}",
")",
")",
";",
"/",
"/",
"valid",
"command",
"arguments",
"assert",
"true",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
"}",
")",
")",
";",
"assert",
"true",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"setlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"debug",
"\"",
"}",
")",
")",
";",
"assert",
"true",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"http",
"\"",
"}",
")",
")",
";",
"assert",
"true",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"https",
"\"",
"}",
")",
")",
";",
"assert",
"true",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"setlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"debug",
"\"",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"http",
"\"",
"}",
")",
")",
";",
"assert",
"true",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"setlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"debug",
"\"",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"https",
"\"",
"}",
")",
")",
";",
"/",
"/",
"fail",
"due",
"to",
"the",
"extra",
"argument",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"https",
"\"",
",",
"\"",
"blah",
"\"",
"}",
")",
")",
";",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"setlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"debug",
"\"",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"https",
"\"",
",",
"\"",
"blah",
"\"",
"}",
")",
")",
";",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"https",
"\"",
",",
"\"",
"-",
"protocol",
"\"",
",",
"\"",
"https",
"\"",
"}",
")",
")",
";",
"assert",
"false",
"(",
"validate",
"command",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"getlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
",",
"\"",
"-",
"setlevel",
"\"",
",",
"\"",
"foo",
"bar",
":",
"8080",
"\"",
",",
"class",
"name",
"}",
")",
")",
";",
"}"
] |
[
"wrapper",
"of",
"{",
"@",
"link",
"pl",
"droidsonroids",
"gif",
"gif",
"drawable",
"#",
"gif",
"drawable",
"(",
"java",
"io",
"input",
"stream",
")",
"}"
] | [
"public",
"t",
"from",
"(",
"input",
"stream",
"input",
"stream",
")",
"{",
"m",
"input",
"source",
"=",
"new",
"input",
"source",
"input",
"stream",
"source",
"(",
"input",
"stream",
")",
";",
"return",
"self",
"(",
")",
";",
"}"
] |
[
"navigates",
"the",
"user",
"to",
"the",
"system",
"settings",
"for",
"the",
"desired",
"notification",
"channel"
] | [
"public",
"static",
"void",
"open",
"channel",
"settings",
"(",
"@",
"non",
"null",
"context",
"context",
",",
"@",
"non",
"null",
"string",
"channel",
"id",
")",
"{",
"if",
"(",
"!",
"supported",
"(",
")",
")",
"{",
"return",
";",
"}",
"intent",
"intent",
"=",
"new",
"intent",
"(",
"settings",
"action",
"channel",
"notification",
"settings",
")",
";",
"intent",
"put",
"extra",
"(",
"settings",
"extra",
"channel",
"id",
",",
"channel",
"id",
")",
";",
"intent",
"put",
"extra",
"(",
"settings",
"extra",
"app",
"package",
",",
"context",
"get",
"package",
"name",
"(",
")",
")",
";",
"context",
"start",
"activity",
"(",
"intent",
")",
";",
"}"
] |
[
"marks",
"task",
"as",
"finished"
] | [
"public",
"void",
"finish",
"(",
")",
"{",
"final",
"list",
"<",
"runnable",
">",
"listeners",
";",
"synchronized",
"(",
"this",
")",
"{",
"this",
"finished",
"=",
"true",
";",
"if",
"(",
"cancellation",
"listeners",
"!",
"=",
"null",
")",
"{",
"listeners",
"=",
"cancellation",
"listeners",
";",
"cancellation",
"listeners",
"=",
"null",
";",
"}",
"else",
"{",
"listeners",
"=",
"collections",
"empty",
"list",
"(",
")",
";",
"}",
"}",
"/",
"/",
"we",
"need",
"to",
"call",
"the",
"listener",
"outside",
"of",
"the",
"synchronised",
"section",
"to",
"avoid",
"potential",
"bottle",
"necks",
"/",
"/",
"in",
"the",
"listener",
"synchronization",
"notify",
"listeners",
"(",
"listeners",
")",
";",
"}"
] |
[
"returns",
"the",
"y",
"-",
"position",
"of",
"the",
"knob",
"relative",
"to",
"the",
"center",
"of",
"the",
"widget",
"the",
"positive",
"direction",
"is",
"up"
] | [
"public",
"float",
"get",
"knob",
"y",
"(",
")",
"{",
"return",
"knob",
"position",
"y",
";",
"}"
] |
[
"get",
"the",
"data",
"type",
"that",
"corresponds",
"to",
"the",
"given",
"xml",
"element"
] | [
"public",
"data",
"type",
"read",
"x",
"m",
"l",
"data",
"type",
"(",
"xml",
"pull",
"parser",
"parser",
")",
"throws",
"pcode",
"x",
"m",
"l",
"exception",
"{",
"xml",
"element",
"el",
"=",
"parser",
"start",
"(",
"\"",
"type",
"\"",
",",
"\"",
"void",
"\"",
",",
"\"",
"typeref",
"\"",
")",
";",
"try",
"{",
"if",
"(",
"el",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"pcode",
"x",
"m",
"l",
"exception",
"(",
"\"",
"bad",
"<",
"type",
">",
"tag",
"\"",
")",
";",
"}",
"if",
"(",
"el",
"get",
"name",
"(",
")",
"equals",
"(",
"\"",
"void",
"\"",
")",
")",
"{",
"return",
"void",
"dt",
";",
"}",
"if",
"(",
"el",
"get",
"name",
"(",
")",
"equals",
"(",
"\"",
"typeref",
"\"",
")",
")",
"{",
"return",
"find",
"base",
"type",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"name",
"\"",
")",
",",
"el",
"get",
"attribute",
"(",
"\"",
"id",
"\"",
")",
")",
";",
"}",
"string",
"name",
"=",
"el",
"get",
"attribute",
"(",
"\"",
"name",
"\"",
")",
";",
"if",
"(",
"name",
"length",
"(",
")",
"!",
"=",
"0",
")",
"{",
"return",
"find",
"base",
"type",
"(",
"name",
",",
"el",
"get",
"attribute",
"(",
"\"",
"id",
"\"",
")",
")",
";",
"}",
"string",
"meta",
"=",
"el",
"get",
"attribute",
"(",
"\"",
"metatype",
"\"",
")",
";",
"data",
"type",
"restype",
"=",
"null",
";",
"if",
"(",
"meta",
"equals",
"(",
"\"",
"ptr",
"\"",
")",
")",
"{",
"int",
"size",
"=",
"spec",
"xml",
"utils",
"decode",
"int",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"size",
"\"",
")",
")",
";",
"if",
"(",
"parser",
"peek",
"(",
")",
"is",
"start",
"(",
")",
")",
"{",
"data",
"type",
"dt",
"=",
"read",
"x",
"m",
"l",
"data",
"type",
"(",
"parser",
")",
";",
"boolean",
"use",
"default",
"size",
"=",
"(",
"size",
"=",
"=",
"data",
"organization",
"get",
"pointer",
"size",
"(",
")",
"|",
"|",
"size",
">",
"pointer",
"data",
"type",
"max",
"pointer",
"size",
"bytes",
")",
";",
"restype",
"=",
"new",
"pointer",
"data",
"type",
"(",
"dt",
",",
"use",
"default",
"size",
"?",
"-",
"1",
":",
"size",
",",
"prog",
"data",
"types",
")",
";",
"}",
"}",
"else",
"if",
"(",
"meta",
"equals",
"(",
"\"",
"array",
"\"",
")",
")",
"{",
"int",
"arrsize",
"=",
"spec",
"xml",
"utils",
"decode",
"int",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"arraysize",
"\"",
")",
")",
";",
"if",
"(",
"parser",
"peek",
"(",
")",
"is",
"start",
"(",
")",
")",
"{",
"data",
"type",
"dt",
"=",
"read",
"x",
"m",
"l",
"data",
"type",
"(",
"parser",
")",
";",
"if",
"(",
"dt",
"=",
"=",
"null",
"|",
"|",
"dt",
"get",
"length",
"(",
")",
"=",
"=",
"0",
")",
"{",
"dt",
"=",
"data",
"type",
"default",
";",
"}",
"restype",
"=",
"new",
"array",
"data",
"type",
"(",
"dt",
",",
"arrsize",
",",
"dt",
"get",
"length",
"(",
")",
",",
"prog",
"data",
"types",
")",
";",
"}",
"}",
"else",
"if",
"(",
"meta",
"equals",
"(",
"\"",
"spacebase",
"\"",
")",
")",
"{",
"/",
"/",
"typically",
"the",
"type",
"of",
"\"",
"the",
"whole",
"stack",
"\"",
"parser",
"discard",
"sub",
"tree",
"(",
")",
";",
"/",
"/",
"get",
"rid",
"of",
"unused",
"\"",
"addr",
"\"",
"element",
"return",
"void",
"dt",
";",
"}",
"else",
"if",
"(",
"meta",
"equals",
"(",
"\"",
"struct",
"\"",
")",
")",
"{",
"/",
"/",
"we",
"now",
"can",
"reach",
"here",
"with",
"the",
"decompiler",
"inventing",
"structures",
",",
"apparently",
"/",
"/",
"this",
"is",
"a",
"band",
"-",
"aid",
"so",
"that",
"we",
"don",
"'",
"t",
"blow",
"up",
"/",
"/",
"just",
"make",
"an",
"undefined",
"data",
"type",
"of",
"the",
"appropriate",
"size",
"int",
"size",
"=",
"spec",
"xml",
"utils",
"decode",
"int",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"size",
"\"",
")",
")",
";",
"return",
"undefined",
"get",
"undefined",
"data",
"type",
"(",
"size",
")",
";",
"/",
"/",
"old",
"comment",
":",
"/",
"/",
"structures",
"should",
"always",
"be",
"named",
"so",
"we",
"should",
"never",
"reach",
"here",
"/",
"/",
"if",
"all",
"the",
"structures",
"are",
"contained",
"in",
"ghidra",
"i",
"should",
"probably",
"add",
"the",
"/",
"/",
"parsing",
"here",
"so",
"the",
"decompiler",
"can",
"pass",
"new",
"structures",
"into",
"ghidra",
"}",
"else",
"if",
"(",
"meta",
"equals",
"(",
"\"",
"int",
"\"",
")",
")",
"{",
"int",
"size",
"=",
"spec",
"xml",
"utils",
"decode",
"int",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"size",
"\"",
")",
")",
";",
"return",
"abstract",
"integer",
"data",
"type",
"get",
"signed",
"data",
"type",
"(",
"size",
",",
"prog",
"data",
"types",
")",
";",
"}",
"else",
"if",
"(",
"meta",
"equals",
"(",
"\"",
"uint",
"\"",
")",
")",
"{",
"int",
"size",
"=",
"spec",
"xml",
"utils",
"decode",
"int",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"size",
"\"",
")",
")",
";",
"return",
"abstract",
"integer",
"data",
"type",
"get",
"unsigned",
"data",
"type",
"(",
"size",
",",
"prog",
"data",
"types",
")",
";",
"}",
"else",
"if",
"(",
"meta",
"equals",
"(",
"\"",
"float",
"\"",
")",
")",
"{",
"int",
"size",
"=",
"spec",
"xml",
"utils",
"decode",
"int",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"size",
"\"",
")",
")",
";",
"return",
"abstract",
"float",
"data",
"type",
"get",
"float",
"data",
"type",
"(",
"size",
",",
"prog",
"data",
"types",
")",
";",
"}",
"else",
"{",
"/",
"/",
"we",
"typically",
"reach",
"here",
"if",
"the",
"decompiler",
"invents",
"a",
"new",
"type",
"/",
"/",
"probably",
"an",
"unknown",
"with",
"a",
"non",
"-",
"standard",
"size",
"int",
"size",
"=",
"spec",
"xml",
"utils",
"decode",
"int",
"(",
"el",
"get",
"attribute",
"(",
"\"",
"size",
"\"",
")",
")",
";",
"return",
"undefined",
"get",
"undefined",
"data",
"type",
"(",
"size",
")",
"clone",
"(",
"prog",
"data",
"types",
")",
";",
"}",
"if",
"(",
"restype",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"pcode",
"x",
"m",
"l",
"exception",
"(",
"\"",
"unable",
"to",
"resolve",
"data",
"type",
"\"",
")",
";",
"}",
"return",
"restype",
";",
"}",
"finally",
"{",
"parser",
"discard",
"sub",
"tree",
"(",
"el",
")",
";",
"/",
"/",
"parser",
"end",
"(",
"el",
")",
";",
"}",
"}"
] |
[
"return",
"a",
"{",
"@",
"code",
"request",
"predicate",
"}",
"that",
"matches",
"if",
"request",
"'",
"s",
"http",
"method",
"is",
"{",
"@",
"code",
"get",
"}",
"and",
"the",
"given",
"{",
"@",
"code",
"pattern",
"}",
"matches",
"against",
"the",
"request",
"path"
] | [
"public",
"static",
"request",
"predicate",
"get",
"(",
"string",
"pattern",
")",
"{",
"return",
"method",
"(",
"http",
"method",
"get",
")",
"and",
"(",
"path",
"(",
"pattern",
")",
")",
";",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.