docstring_tokens
list | code_tokens
list |
---|---|
[
"gets",
"a",
"collection",
"of",
"tuples",
"of",
"doc",
"id",
",",
"sequence",
"number",
",",
"and",
"primary",
"term",
"of",
"all",
"live",
"documents",
"in",
"the",
"provided",
"engine"
] |
[
"public",
"static",
"list",
"<",
"doc",
"id",
"seq",
"no",
"and",
"source",
">",
"get",
"doc",
"ids",
"(",
"engine",
"engine",
",",
"boolean",
"refresh",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"refresh",
")",
"{",
"engine",
"refresh",
"(",
"\"",
"test",
"get",
"doc",
"ids",
"\"",
")",
";",
"}",
"try",
"(",
"engine",
"searcher",
"searcher",
"=",
"engine",
"acquire",
"searcher",
"(",
"\"",
"test",
"get",
"doc",
"ids",
"\"",
",",
"engine",
"searcher",
"scope",
"internal",
")",
")",
"{",
"list",
"<",
"doc",
"id",
"seq",
"no",
"and",
"source",
">",
"docs",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"leaf",
"reader",
"context",
"leaf",
"context",
":",
"searcher",
"get",
"index",
"reader",
"(",
")",
"leaves",
"(",
")",
")",
"{",
"leaf",
"reader",
"reader",
"=",
"leaf",
"context",
"reader",
"(",
")",
";",
"numeric",
"doc",
"values",
"seq",
"no",
"doc",
"values",
"=",
"reader",
"get",
"numeric",
"doc",
"values",
"(",
"seq",
"no",
"field",
"mapper",
"name",
")",
";",
"numeric",
"doc",
"values",
"primary",
"term",
"doc",
"values",
"=",
"reader",
"get",
"numeric",
"doc",
"values",
"(",
"seq",
"no",
"field",
"mapper",
"primary",
"term",
"name",
")",
";",
"numeric",
"doc",
"values",
"version",
"doc",
"values",
"=",
"reader",
"get",
"numeric",
"doc",
"values",
"(",
"version",
"field",
"mapper",
"name",
")",
";",
"bits",
"live",
"docs",
"=",
"reader",
"get",
"live",
"docs",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"reader",
"max",
"doc",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"live",
"docs",
"=",
"=",
"null",
"|",
"|",
"live",
"docs",
"get",
"(",
"i",
")",
")",
"{",
"if",
"(",
"primary",
"term",
"doc",
"values",
"advance",
"exact",
"(",
"i",
")",
"=",
"=",
"false",
")",
"{",
"/",
"/",
"we",
"have",
"to",
"skip",
"non",
"-",
"root",
"docs",
"because",
"its",
"id",
"field",
"is",
"not",
"stored",
"(",
"indexed",
"only",
")",
"continue",
";",
"}",
"final",
"long",
"primary",
"term",
"=",
"primary",
"term",
"doc",
"values",
"long",
"value",
"(",
")",
";",
"document",
"doc",
"=",
"reader",
"document",
"(",
"i",
",",
"set",
"of",
"(",
"id",
"field",
"mapper",
"name",
",",
"source",
"field",
"mapper",
"name",
")",
")",
";",
"bytes",
"ref",
"binary",
"i",
"d",
"=",
"doc",
"get",
"binary",
"value",
"(",
"id",
"field",
"mapper",
"name",
")",
";",
"string",
"id",
"=",
"uid",
"decode",
"id",
"(",
"arrays",
"copy",
"of",
"range",
"(",
"binary",
"i",
"d",
"bytes",
",",
"binary",
"i",
"d",
"offset",
",",
"binary",
"i",
"d",
"offset",
"+",
"binary",
"i",
"d",
"length",
")",
")",
";",
"final",
"bytes",
"ref",
"source",
"=",
"doc",
"get",
"binary",
"value",
"(",
"source",
"field",
"mapper",
"name",
")",
";",
"if",
"(",
"seq",
"no",
"doc",
"values",
"advance",
"exact",
"(",
"i",
")",
"=",
"=",
"false",
")",
"{",
"throw",
"new",
"assertion",
"error",
"(",
"\"",
"seq",
"no",
"doc",
"values",
"not",
"found",
"for",
"doc",
"[",
"\"",
"+",
"i",
"+",
"\"",
"]",
"id",
"[",
"\"",
"+",
"id",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"final",
"long",
"seq",
"no",
"=",
"seq",
"no",
"doc",
"values",
"long",
"value",
"(",
")",
";",
"if",
"(",
"version",
"doc",
"values",
"advance",
"exact",
"(",
"i",
")",
"=",
"=",
"false",
")",
"{",
"throw",
"new",
"assertion",
"error",
"(",
"\"",
"version",
"doc",
"values",
"not",
"found",
"for",
"doc",
"[",
"\"",
"+",
"i",
"+",
"\"",
"]",
"id",
"[",
"\"",
"+",
"id",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"final",
"long",
"version",
"=",
"version",
"doc",
"values",
"long",
"value",
"(",
")",
";",
"docs",
"add",
"(",
"new",
"doc",
"id",
"seq",
"no",
"and",
"source",
"(",
"id",
",",
"source",
",",
"seq",
"no",
",",
"primary",
"term",
",",
"version",
")",
")",
";",
"}",
"}",
"}",
"docs",
"sort",
"(",
"comparator",
"comparing",
"long",
"(",
"doc",
"id",
"seq",
"no",
"and",
"source",
":",
":",
"get",
"seq",
"no",
")",
"then",
"comparing",
"long",
"(",
"doc",
"id",
"seq",
"no",
"and",
"source",
":",
":",
"get",
"primary",
"term",
")",
"then",
"comparing",
"(",
"(",
"doc",
"id",
"seq",
"no",
"and",
"source",
":",
":",
"get",
"id",
")",
")",
")",
";",
"return",
"docs",
";",
"}",
"}"
] |
[
"reset",
"all",
"the",
"metrics",
"being",
"tracked"
] |
[
"public",
"void",
"reset",
"metric",
"diffs",
"(",
")",
"{",
"metric",
"diffs",
"values",
"(",
")",
"for",
"each",
"(",
"s",
"3",
"a",
"test",
"utils",
"metric",
"diff",
":",
":",
"reset",
")",
";",
"}"
] |
[
"creates",
"a",
"clone",
"to",
"be",
"used",
"to",
"execute",
"a",
"command"
] |
[
"protected",
"c",
"l",
"i",
"command",
"create",
"clone",
"(",
")",
"{",
"try",
"{",
"return",
"get",
"class",
"(",
")",
"new",
"instance",
"(",
")",
";",
"}",
"catch",
"(",
"illegal",
"access",
"exception",
"|",
"instantiation",
"exception",
"e",
")",
"{",
"throw",
"new",
"assertion",
"error",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"return",
"the",
"writer",
"idle",
"time",
"that",
"was",
"given",
"when",
"instance",
"this",
"class",
"in",
"milliseconds"
] |
[
"public",
"long",
"get",
"writer",
"idle",
"time",
"in",
"millis",
"(",
")",
"{",
"return",
"time",
"unit",
"nanoseconds",
"to",
"millis",
"(",
"writer",
"idle",
"time",
"nanos",
")",
";",
"}"
] |
[
"specify",
"the",
"spring",
"{",
"@",
"link",
"org",
"springframework",
"transaction",
"platform",
"transaction",
"manager",
"}",
"to",
"use",
"for",
"transactional",
"wrapping",
"of",
"message",
"reception",
"plus",
"listener",
"execution",
"default",
"is",
"none",
",",
"not",
"performing",
"any",
"transactional",
"wrapping",
"if",
"specified",
",",
"this",
"will",
"usually",
"be",
"a",
"spring",
"{",
"@",
"link",
"org",
"springframework",
"transaction",
"jta",
"jta",
"transaction",
"manager",
"}",
"or",
"one",
"of",
"its",
"subclasses",
",",
"in",
"combination",
"with",
"a",
"jta",
"-",
"aware",
"connection",
"factory",
"that",
"this",
"message",
"listener",
"container",
"obtains",
"its",
"connections",
"from",
"<",
"b",
">",
"note",
":",
"consider",
"the",
"use",
"of",
"local",
"jms",
"transactions",
"instead",
"<",
"b",
">",
"simply",
"switch",
"the",
"{",
"@",
"link",
"#",
"set",
"session",
"transacted",
"\"",
"session",
"transacted",
"\"",
"}",
"flag",
"to",
"\"",
"true",
"\"",
"in",
"order",
"to",
"use",
"a",
"locally",
"transacted",
"jms",
"session",
"for",
"the",
"entire",
"receive",
"processing",
",",
"including",
"any",
"session",
"operations",
"performed",
"by",
"a",
"{",
"@",
"link",
"session",
"aware",
"message",
"listener",
"}",
"(",
"e",
"g",
"sending",
"a",
"response",
"message",
")",
"this",
"allows",
"for",
"fully",
"synchronized",
"spring",
"transactions",
"based",
"on",
"local",
"jms",
"transactions",
",",
"similar",
"to",
"what",
"{",
"@",
"link",
"org",
"springframework",
"jms",
"connection",
"jms",
"transaction",
"manager",
"}",
"provides",
"check",
"{",
"@",
"link",
"abstract",
"message",
"listener",
"container",
"}",
"'",
"s",
"javadoc",
"for",
"a",
"discussion",
"of",
"transaction",
"choices",
"and",
"message",
"redelivery",
"scenarios"
] |
[
"public",
"void",
"set",
"transaction",
"manager",
"(",
"@",
"nullable",
"platform",
"transaction",
"manager",
"transaction",
"manager",
")",
"{",
"this",
"transaction",
"manager",
"=",
"transaction",
"manager",
";",
"}"
] |
[
"returns",
"whether",
"the",
"exception",
"'",
"s",
"try",
"block",
"contains",
"the",
"instruction",
"at",
"the",
"given",
"offset"
] |
[
"public",
"boolean",
"is",
"applicable",
"(",
"int",
"instruction",
"offset",
")",
"{",
"return",
"instruction",
"offset",
">",
"=",
"u",
"2start",
"p",
"c",
"&",
"&",
"instruction",
"offset",
"<",
"u",
"2end",
"p",
"c",
";",
"}"
] |
[
"returns",
"current",
"register",
"value",
"or",
"null",
"if",
"it",
"has",
"not",
"been",
"set"
] |
[
"big",
"integer",
"value",
"(",
")",
"{",
"return",
"value",
";",
"}"
] |
[
"sets",
"the",
"number",
"of",
"shard",
"copies",
"that",
"should",
"be",
"active",
"for",
"creation",
"of",
"the",
"new",
"rollover",
"index",
"to",
"return",
"defaults",
"to",
"{",
"@",
"link",
"active",
"shard",
"count",
"#",
"default",
"}",
",",
"which",
"will",
"wait",
"for",
"one",
"shard",
"copy",
"(",
"the",
"primary",
")",
"to",
"become",
"active",
"set",
"this",
"value",
"to",
"{",
"@",
"link",
"active",
"shard",
"count",
"#",
"all",
"}",
"to",
"wait",
"for",
"all",
"shards",
"(",
"primary",
"and",
"all",
"replicas",
")",
"to",
"be",
"active",
"before",
"returning",
"otherwise",
",",
"use",
"{",
"@",
"link",
"active",
"shard",
"count",
"#",
"from",
"(",
"int",
")",
"}",
"to",
"set",
"this",
"value",
"to",
"any",
"non",
"-",
"negative",
"integer",
",",
"up",
"to",
"the",
"number",
"of",
"copies",
"per",
"shard",
"(",
"number",
"of",
"replicas",
"+",
"1",
")",
",",
"to",
"wait",
"for",
"the",
"desired",
"amount",
"of",
"shard",
"copies",
"to",
"become",
"active",
"before",
"returning",
"index",
"creation",
"will",
"only",
"wait",
"up",
"until",
"the",
"timeout",
"value",
"for",
"the",
"number",
"of",
"shard",
"copies",
"to",
"be",
"active",
"before",
"returning",
"check",
"{",
"@",
"link",
"rollover",
"response",
"#",
"is",
"shards",
"acknowledged",
"(",
")",
"}",
"to",
"determine",
"if",
"the",
"requisite",
"shard",
"copies",
"were",
"all",
"started",
"before",
"returning",
"or",
"timing",
"out"
] |
[
"public",
"rollover",
"request",
"builder",
"wait",
"for",
"active",
"shards",
"(",
"active",
"shard",
"count",
"wait",
"for",
"active",
"shards",
")",
"{",
"this",
"request",
"get",
"create",
"index",
"request",
"(",
")",
"wait",
"for",
"active",
"shards",
"(",
"wait",
"for",
"active",
"shards",
")",
";",
"return",
"this",
";",
"}"
] |
[
"get",
"the",
"full",
"class",
"name",
"of",
"self"
] |
[
"protected",
"string",
"get",
"class",
"name",
"(",
")",
"{",
"return",
"get",
"class",
"(",
")",
"get",
"name",
"(",
")",
";",
"}"
] |
[
"sets",
"a",
"rest",
"client",
"factory",
"for",
"custom",
"client",
"configuration"
] |
[
"public",
"void",
"set",
"rest",
"client",
"factory",
"(",
"rest",
"client",
"factory",
"rest",
"client",
"factory",
")",
"{",
"this",
"rest",
"client",
"factory",
"=",
"preconditions",
"check",
"not",
"null",
"(",
"rest",
"client",
"factory",
")",
";",
"}"
] |
[
"return",
"a",
"spring",
"pointcut",
"expression",
"for",
"a",
"singleton",
"aspect",
"(",
"e",
"g",
"{",
"@",
"code",
"pointcut",
"true",
"}",
"if",
"it",
"'",
"s",
"a",
"singleton",
")"
] |
[
"public",
"pointcut",
"get",
"per",
"clause",
"pointcut",
"(",
")",
"{",
"return",
"this",
"per",
"clause",
"pointcut",
";",
"}"
] |
[
"define",
"the",
"main",
"panel"
] |
[
"protected",
"j",
"panel",
"build",
"main",
"panel",
"(",
"boolean",
"is",
"dynamic",
")",
"{",
"main",
"panel",
"=",
"new",
"j",
"panel",
"(",
"new",
"border",
"layout",
"(",
")",
")",
";",
"instruction",
"text",
"=",
"new",
"j",
"text",
"area",
"(",
")",
";",
"font",
"default",
"font",
"=",
"instruction",
"text",
"get",
"font",
"(",
")",
";",
"font",
"fixed",
"width",
"font",
"=",
"new",
"font",
"(",
"\"",
"monospaced",
"\"",
",",
"default",
"font",
"get",
"style",
"(",
")",
",",
"14",
")",
";",
"instruction",
"text",
"set",
"font",
"(",
"fixed",
"width",
"font",
")",
";",
"instruction",
"text",
"set",
"editable",
"(",
"false",
")",
";",
"operand",
"model",
"=",
"new",
"operand",
"model",
"(",
")",
";",
"op",
"table",
"=",
"new",
"ghidra",
"table",
"(",
"operand",
"model",
")",
";",
"op",
"table",
"set",
"font",
"(",
"fixed",
"width",
"font",
")",
";",
"op",
"table",
"set",
"preferred",
"scrollable",
"viewport",
"size",
"(",
"new",
"dimension",
"(",
"425",
",",
"105",
")",
")",
";",
"/",
"/",
"op",
"table",
"set",
"auto",
"resize",
"mode",
"(",
"j",
"table",
"auto",
"resize",
"all",
"columns",
")",
";",
"op",
"table",
"set",
"row",
"selection",
"allowed",
"(",
"false",
")",
";",
"pane",
"=",
"new",
"j",
"split",
"pane",
"(",
"j",
"split",
"pane",
"horizontal",
"split",
",",
"new",
"j",
"scroll",
"pane",
"(",
"instruction",
"text",
")",
",",
"new",
"j",
"scroll",
"pane",
"(",
"op",
"table",
")",
")",
";",
"pane",
"set",
"resize",
"weight",
"(",
"25",
")",
";",
"main",
"panel",
"add",
"(",
"pane",
",",
"border",
"layout",
"center",
")",
";",
"dynamic",
"update",
"c",
"b",
"=",
"new",
"g",
"check",
"box",
"(",
"\"",
"dynamic",
"update",
"\"",
",",
"is",
"dynamic",
")",
";",
"dynamic",
"update",
"c",
"b",
"set",
"alignment",
"x",
"(",
"component",
"center",
"alignment",
")",
";",
"dynamic",
"update",
"c",
"b",
"add",
"item",
"listener",
"(",
"e",
"-",
">",
"dynamic",
"state",
"changed",
"(",
")",
")",
";",
"main",
"panel",
"add",
"(",
"dynamic",
"update",
"c",
"b",
",",
"border",
"layout",
"south",
")",
";",
"main",
"panel",
"validate",
"(",
")",
";",
"return",
"main",
"panel",
";",
"}"
] |
[
"test",
"for",
"https",
":",
"github",
"comelasticelasticsearchissues",
"1",
"7",
"7",
"0",
"1"
] |
[
"public",
"void",
"test",
"gappy",
"index",
"with",
"sigma",
"(",
")",
"{",
"double",
"sigma",
"=",
"random",
"double",
"between",
"(",
"1",
"0",
",",
"6",
"0",
",",
"true",
")",
";",
"search",
"response",
"response",
"=",
"client",
"(",
")",
"prepare",
"search",
"(",
"\"",
"idx",
"gappy",
"\"",
")",
"add",
"aggregation",
"(",
"histogram",
"(",
"\"",
"histo",
"\"",
")",
"field",
"(",
"single",
"valued",
"field",
"name",
")",
"interval",
"(",
"1l",
")",
")",
"add",
"aggregation",
"(",
"extended",
"stats",
"bucket",
"(",
"\"",
"extended",
"stats",
"bucket",
"\"",
",",
"\"",
"histo",
">",
"count",
"\"",
")",
"sigma",
"(",
"sigma",
")",
")",
"get",
"(",
")",
";",
"assert",
"search",
"response",
"(",
"response",
")",
";",
"histogram",
"histo",
"=",
"response",
"get",
"aggregations",
"(",
")",
"get",
"(",
"\"",
"histo",
"\"",
")",
";",
"assert",
"that",
"(",
"histo",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"assert",
"that",
"(",
"histo",
"get",
"name",
"(",
")",
",",
"equal",
"to",
"(",
"\"",
"histo",
"\"",
")",
")",
";",
"list",
"<",
"?",
"extends",
"bucket",
">",
"buckets",
"=",
"histo",
"get",
"buckets",
"(",
")",
";",
"assert",
"that",
"(",
"buckets",
"size",
"(",
")",
",",
"equal",
"to",
"(",
"6",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"6",
";",
"+",
"+",
"i",
")",
"{",
"long",
"expected",
"doc",
"count",
";",
"if",
"(",
"i",
"=",
"=",
"3",
")",
"{",
"expected",
"doc",
"count",
"=",
"2",
";",
"}",
"else",
"if",
"(",
"i",
"=",
"=",
"4",
")",
"{",
"expected",
"doc",
"count",
"=",
"0",
";",
"}",
"else",
"{",
"expected",
"doc",
"count",
"=",
"1",
";",
"}",
"histogram",
"bucket",
"bucket",
"=",
"buckets",
"get",
"(",
"i",
")",
";",
"assert",
"that",
"(",
"\"",
"i",
":",
"\"",
"+",
"i",
",",
"bucket",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"assert",
"that",
"(",
"\"",
"i",
":",
"\"",
"+",
"i",
",",
"(",
"(",
"number",
")",
"bucket",
"get",
"key",
"(",
")",
")",
"long",
"value",
"(",
")",
",",
"equal",
"to",
"(",
"(",
"long",
")",
"i",
")",
")",
";",
"assert",
"that",
"(",
"\"",
"i",
":",
"\"",
"+",
"i",
",",
"bucket",
"get",
"doc",
"count",
"(",
")",
",",
"equal",
"to",
"(",
"expected",
"doc",
"count",
")",
")",
";",
"}",
"extended",
"stats",
"bucket",
"extended",
"stats",
"bucket",
"value",
"=",
"response",
"get",
"aggregations",
"(",
")",
"get",
"(",
"\"",
"extended",
"stats",
"bucket",
"\"",
")",
";",
"long",
"count",
"=",
"6l",
";",
"double",
"sum",
"=",
"1",
"0",
"+",
"1",
"0",
"+",
"1",
"0",
"+",
"2",
"0",
"+",
"0",
"0",
"+",
"1",
"0",
";",
"double",
"sum",
"of",
"sqrs",
"=",
"1",
"0",
"+",
"1",
"0",
"+",
"1",
"0",
"+",
"4",
"0",
"+",
"0",
"0",
"+",
"1",
"0",
";",
"double",
"avg",
"=",
"sum",
"/",
"count",
";",
"double",
"var",
"=",
"(",
"sum",
"of",
"sqrs",
"-",
"(",
"(",
"sum",
"*",
"sum",
")",
"/",
"count",
")",
")",
"/",
"count",
";",
"var",
"=",
"var",
"<",
"0",
"?",
"0",
":",
"var",
";",
"double",
"std",
"dev",
"=",
"math",
"sqrt",
"(",
"var",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"name",
"(",
")",
",",
"equal",
"to",
"(",
"\"",
"extended",
"stats",
"bucket",
"\"",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"min",
"(",
")",
",",
"equal",
"to",
"(",
"0",
"0",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"max",
"(",
")",
",",
"equal",
"to",
"(",
"2",
"0",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"count",
"(",
")",
",",
"equal",
"to",
"(",
"count",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"sum",
"(",
")",
",",
"equal",
"to",
"(",
"sum",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"avg",
"(",
")",
",",
"equal",
"to",
"(",
"avg",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"sum",
"of",
"squares",
"(",
")",
",",
"equal",
"to",
"(",
"sum",
"of",
"sqrs",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"variance",
"(",
")",
",",
"equal",
"to",
"(",
"var",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"std",
"deviation",
"(",
")",
",",
"equal",
"to",
"(",
"std",
"dev",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"std",
"deviation",
"bound",
"(",
"bounds",
"lower",
")",
",",
"equal",
"to",
"(",
"avg",
"-",
"(",
"sigma",
"*",
"std",
"dev",
")",
")",
")",
";",
"assert",
"that",
"(",
"extended",
"stats",
"bucket",
"value",
"get",
"std",
"deviation",
"bound",
"(",
"bounds",
"upper",
")",
",",
"equal",
"to",
"(",
"avg",
"+",
"(",
"sigma",
"*",
"std",
"dev",
")",
")",
")",
";",
"}"
] |
[
"enables",
"the",
"console",
"reporter",
"for",
"the",
"given",
"metrics",
"registry",
",",
"and",
"causes",
"it",
"to",
"print",
"to",
"stdout",
"with",
"the",
"specified",
"period",
"and",
"unrestricted",
"output"
] |
[
"public",
"static",
"void",
"enable",
"(",
"final",
"metrics",
"registry",
"metrics",
"registry",
",",
"final",
"long",
"period",
",",
"final",
"time",
"unit",
"unit",
")",
"{",
"final",
"custom",
"reporter",
"reporter",
"=",
"new",
"custom",
"reporter",
"(",
"metrics",
"registry",
",",
"system",
"out",
",",
"metric",
"predicate",
"all",
")",
";",
"reporter",
"start",
"(",
"period",
",",
"unit",
")",
";",
"}"
] |
[
"create",
"a",
"new",
"{",
"@",
"link",
"call",
"credentials",
"provider",
"}",
"object",
"from",
"{",
"@",
"link",
"credentials",
"}",
"or",
"return",
"{",
"@",
"link",
"call",
"credentials",
"provider",
"#",
"no",
"credentials",
"}",
"if",
"it",
"is",
"{",
"@",
"code",
"null",
"}"
] |
[
"public",
"static",
"call",
"credentials",
"provider",
"new",
"call",
"credentials",
"provider",
"(",
"@",
"nullable",
"credentials",
"creds",
")",
"{",
"if",
"(",
"creds",
"!",
"=",
"null",
")",
"{",
"return",
"new",
"google",
"auth",
"call",
"credentials",
"provider",
"(",
"creds",
")",
";",
"}",
"return",
"call",
"credentials",
"provider",
"no",
"credentials",
";",
"}"
] |
[
"returns",
"whether",
"all",
"of",
"the",
"given",
"instruction",
"offsets",
"(",
"at",
"least",
"one",
")",
"are",
"smaller",
"than",
"or",
"equal",
"to",
"the",
"given",
"offset"
] |
[
"private",
"boolean",
"is",
"all",
"smaller",
"than",
"or",
"equal",
"(",
"instruction",
"offset",
"value",
"instruction",
"offsets",
",",
"int",
"instruction",
"offset",
")",
"{",
"if",
"(",
"instruction",
"offsets",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"loop",
"over",
"all",
"instruction",
"offsets",
"int",
"branch",
"count",
"=",
"instruction",
"offsets",
"instruction",
"offset",
"count",
"(",
")",
";",
"if",
"(",
"branch",
"count",
">",
"0",
")",
"{",
"for",
"(",
"int",
"branch",
"index",
"=",
"0",
";",
"branch",
"index",
"<",
"branch",
"count",
";",
"branch",
"index",
"+",
"+",
")",
"{",
"/",
"/",
"is",
"the",
"offset",
"larger",
"than",
"the",
"reference",
"offset",
"?",
"if",
"(",
"instruction",
"offsets",
"instruction",
"offset",
"(",
"branch",
"index",
")",
">",
"instruction",
"offset",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] |
[
"ha",
"rule",
"configuration",
"for",
"spring",
"boot"
] |
[
"public",
"rule",
"configuration",
"ha",
"rule",
"configuration",
"(",
"final",
"object",
"provider",
"<",
"map",
"<",
"string",
",",
"replica",
"load",
"balance",
"algorithm",
">",
">",
"load",
"balance",
"algorithms",
")",
"{",
"algorithm",
"provided",
"h",
"a",
"rule",
"configuration",
"result",
"=",
"swapper",
"swap",
"to",
"object",
"(",
"yaml",
"config",
"get",
"ha",
"(",
")",
")",
";",
"map",
"<",
"string",
",",
"replica",
"load",
"balance",
"algorithm",
">",
"balance",
"algorithm",
"map",
"=",
"optional",
"of",
"nullable",
"(",
"load",
"balance",
"algorithms",
"get",
"if",
"available",
"(",
")",
")",
"or",
"else",
"(",
"collections",
"empty",
"map",
"(",
")",
")",
";",
"result",
"set",
"load",
"balance",
"algorithms",
"(",
"balance",
"algorithm",
"map",
")",
";",
"return",
"result",
";",
"}"
] |
[
"returns",
"the",
"largest",
"power",
"of",
"two",
"less",
"than",
"or",
"equal",
"to",
"{",
"@",
"code",
"x",
"}",
"this",
"is",
"equivalent",
"to",
"{",
"@",
"code",
"checked",
"pow",
"(",
"2",
",",
"log",
"2",
"(",
"x",
",",
"floor",
")",
")",
"}"
] |
[
"public",
"static",
"long",
"floor",
"power",
"of",
"two",
"(",
"long",
"x",
")",
"{",
"check",
"positive",
"(",
"\"",
"x",
"\"",
",",
"x",
")",
";",
"/",
"/",
"long",
"highest",
"one",
"bit",
"was",
"buggy",
"on",
"gwt",
"we",
"'",
"ve",
"fixed",
"it",
",",
"but",
"i",
"'",
"m",
"not",
"certain",
"when",
"the",
"fix",
"will",
"/",
"/",
"be",
"released",
"return",
"1l",
"<",
"<",
"(",
"(",
"long",
"size",
"-",
"1",
")",
"-",
"long",
"number",
"of",
"leading",
"zeros",
"(",
"x",
")",
")",
";",
"}"
] |
[
"returns",
"<",
"code",
">",
"true",
"<",
"code",
">",
"if",
"the",
"given",
"key",
"is",
"a",
"valid",
"delete",
"key"
] |
[
"private",
"boolean",
"is",
"valid",
"delete",
"(",
"string",
"key",
",",
"boolean",
"only",
"dynamic",
")",
"{",
"return",
"is",
"final",
"setting",
"(",
"key",
")",
"=",
"=",
"false",
"&",
"&",
"/",
"/",
"it",
"'",
"s",
"not",
"a",
"final",
"setting",
"(",
"only",
"dynamic",
"&",
"&",
"is",
"dynamic",
"setting",
"(",
"key",
")",
"/",
"/",
"it",
"'",
"s",
"a",
"dynamic",
"setting",
"and",
"we",
"only",
"do",
"dynamic",
"settings",
"|",
"|",
"get",
"(",
"key",
")",
"=",
"=",
"null",
"&",
"&",
"key",
"starts",
"with",
"(",
"archived",
"settings",
"prefix",
")",
"/",
"/",
"the",
"setting",
"is",
"not",
"registered",
"and",
"it",
"'",
"s",
"been",
"archived",
"|",
"|",
"(",
"only",
"dynamic",
"=",
"=",
"false",
"&",
"&",
"get",
"(",
"key",
")",
"!",
"=",
"null",
")",
")",
";",
"/",
"/",
"if",
"it",
"'",
"s",
"not",
"dynamic",
"and",
"we",
"have",
"a",
"key",
"}"
] |
[
"@",
"inherit",
"doc"
] |
[
"public",
"void",
"write",
"int",
"(",
"int",
"value",
")",
"{",
"write",
"(",
"(",
"short",
")",
"value",
")",
";",
"write",
"(",
"(",
"short",
")",
"(",
"value",
">",
">",
"16",
")",
")",
";",
"}"
] |
[
"checks",
",",
"whether",
"the",
"given",
"class",
"is",
"public"
] |
[
"public",
"static",
"boolean",
"is",
"public",
"(",
"class",
"<",
"?",
">",
"clazz",
")",
"{",
"return",
"modifier",
"is",
"public",
"(",
"clazz",
"get",
"modifiers",
"(",
")",
")",
";",
"}"
] |
[
"remove",
"the",
"value",
"with",
"given",
"name",
"from",
"the",
"graph"
] |
[
"void",
"remove",
"(",
"sky",
"key",
"key",
")",
";"
] |
[
"if",
"the",
"given",
"model",
"exists",
"it",
"is",
"removed",
"and",
"an",
"item",
"removal",
"is",
"notified",
"otherwise",
"this",
"does",
"nothing"
] |
[
"protected",
"void",
"remove",
"model",
"(",
"epoxy",
"model",
"<",
"?",
">",
"model",
")",
"{",
"int",
"index",
"=",
"get",
"model",
"position",
"(",
"model",
")",
";",
"if",
"(",
"index",
"!",
"=",
"-",
"1",
")",
"{",
"pause",
"model",
"list",
"notifications",
"(",
")",
";",
"models",
"remove",
"(",
"index",
")",
";",
"resume",
"model",
"list",
"notifications",
"(",
")",
";",
"notify",
"item",
"removed",
"(",
"index",
")",
";",
"}",
"}"
] |
[
"initiates",
"a",
"join",
"transformation",
"a",
"join",
"transformation",
"joins",
"the",
"elements",
"of",
"two",
"{",
"@",
"link",
"data",
"set",
"data",
"sets",
"}",
"on",
"key",
"equality",
"and",
"provides",
"multiple",
"ways",
"to",
"combine",
"joining",
"elements",
"into",
"one",
"data",
"set",
"this",
"method",
"also",
"gives",
"the",
"hint",
"to",
"the",
"optimizer",
"that",
"the",
"second",
"data",
"set",
"to",
"join",
"is",
"much",
"larger",
"than",
"the",
"first",
"one",
"this",
"method",
"returns",
"a",
"{",
"@",
"link",
"join",
"operator",
"sets",
"}",
"on",
"which",
"one",
"of",
"the",
"{",
"@",
"code",
"where",
"}",
"methods",
"can",
"be",
"called",
"to",
"define",
"the",
"join",
"key",
"of",
"the",
"first",
"joining",
"(",
"i",
"e",
",",
"this",
")",
"data",
"set"
] |
[
"public",
"<",
"r",
">",
"join",
"operator",
"sets",
"<",
"t",
",",
"r",
">",
"join",
"with",
"huge",
"(",
"data",
"set",
"<",
"r",
">",
"other",
")",
"{",
"return",
"new",
"join",
"operator",
"sets",
"<",
">",
"(",
"this",
",",
"other",
",",
"join",
"hint",
"broadcast",
"hash",
"first",
")",
";",
"}"
] |
[
"build",
"call",
"for",
"get",
"order",
"by",
"id"
] |
[
"public",
"okhttp",
"3",
"call",
"get",
"order",
"by",
"id",
"call",
"(",
"long",
"order",
"id",
",",
"final",
"api",
"callback",
"callback",
")",
"throws",
"api",
"exception",
"{",
"object",
"local",
"var",
"post",
"body",
"=",
"null",
";",
"/",
"/",
"create",
"path",
"and",
"map",
"variables",
"api",
"operation",
"api",
"operation",
"=",
"local",
"var",
"api",
"client",
"get",
"operation",
"lookup",
"map",
"(",
")",
"get",
"(",
"\"",
"get",
"order",
"by",
"id",
"\"",
")",
";",
"if",
"(",
"api",
"operation",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"api",
"exception",
"(",
"\"",
"operation",
"not",
"found",
"in",
"oas",
"\"",
")",
";",
"}",
"operation",
"operation",
"=",
"api",
"operation",
"get",
"operation",
"(",
")",
";",
"string",
"local",
"var",
"path",
"=",
"api",
"operation",
"get",
"path",
"(",
")",
";",
"map",
"<",
"string",
",",
"object",
">",
"param",
"map",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"param",
"map",
"put",
"(",
"\"",
"order",
"id",
"\"",
",",
"order",
"id",
")",
";",
"list",
"<",
"pair",
">",
"local",
"var",
"query",
"params",
"=",
"new",
"array",
"list",
"<",
"pair",
">",
"(",
")",
";",
"list",
"<",
"pair",
">",
"local",
"var",
"collection",
"query",
"params",
"=",
"new",
"array",
"list",
"<",
"pair",
">",
"(",
")",
";",
"map",
"<",
"string",
",",
"string",
">",
"local",
"var",
"header",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"map",
"<",
"string",
",",
"string",
">",
"local",
"var",
"cookie",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"map",
"<",
"string",
",",
"object",
">",
"local",
"var",
"form",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"object",
">",
"(",
")",
";",
"local",
"var",
"path",
"=",
"local",
"var",
"api",
"client",
"fill",
"parameters",
"from",
"operation",
"(",
"operation",
",",
"param",
"map",
",",
"local",
"var",
"path",
",",
"local",
"var",
"query",
"params",
",",
"local",
"var",
"collection",
"query",
"params",
",",
"local",
"var",
"header",
"params",
",",
"local",
"var",
"cookie",
"params",
")",
";",
"final",
"string",
"[",
"]",
"local",
"var",
"accepts",
"=",
"{",
"\"",
"application",
"/",
"xml",
"\"",
",",
"\"",
"application",
"/",
"json",
"\"",
"}",
";",
"final",
"string",
"local",
"var",
"accept",
"=",
"local",
"var",
"api",
"client",
"select",
"header",
"accept",
"(",
"local",
"var",
"accepts",
")",
";",
"if",
"(",
"local",
"var",
"accept",
"!",
"=",
"null",
")",
"{",
"local",
"var",
"header",
"params",
"put",
"(",
"\"",
"accept",
"\"",
",",
"local",
"var",
"accept",
")",
";",
"}",
"final",
"string",
"[",
"]",
"local",
"var",
"content",
"types",
"=",
"{",
"}",
";",
"final",
"string",
"local",
"var",
"content",
"type",
"=",
"local",
"var",
"api",
"client",
"select",
"header",
"content",
"type",
"(",
"local",
"var",
"content",
"types",
")",
";",
"local",
"var",
"header",
"params",
"put",
"(",
"\"",
"content",
"-",
"type",
"\"",
",",
"local",
"var",
"content",
"type",
")",
";",
"string",
"[",
"]",
"local",
"var",
"auth",
"names",
"=",
"new",
"string",
"[",
"]",
"{",
"}",
";",
"return",
"local",
"var",
"api",
"client",
"build",
"call",
"(",
"local",
"var",
"path",
",",
"api",
"operation",
"get",
"method",
"(",
")",
",",
"local",
"var",
"query",
"params",
",",
"local",
"var",
"collection",
"query",
"params",
",",
"local",
"var",
"post",
"body",
",",
"local",
"var",
"header",
"params",
",",
"local",
"var",
"cookie",
"params",
",",
"local",
"var",
"form",
"params",
",",
"local",
"var",
"auth",
"names",
",",
"callback",
")",
";",
"}"
] |
[
"get",
"the",
"file",
"system",
"for",
"hdfs",
"in",
"an",
"rpc",
"port"
] |
[
"public",
"static",
"file",
"system",
"get",
"file",
"system",
"(",
"int",
"rpc",
"port",
")",
"throws",
"i",
"o",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"hdfs",
"configuration",
"(",
")",
";",
"uri",
"uri",
"=",
"uri",
"create",
"(",
"\"",
"hdfs",
":",
"/",
"/",
"localhost",
":",
"\"",
"+",
"rpc",
"port",
")",
";",
"return",
"distributed",
"file",
"system",
"get",
"(",
"uri",
",",
"conf",
")",
";",
"}"
] |
[
"sets",
"symbols",
"to",
"be",
"readwritten"
] |
[
"public",
"void",
"set",
"symbols",
"(",
"boolean",
"b",
")",
"{",
"symbols",
"=",
"b",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"id",
"'"
] |
[
"public",
"void",
"id",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"id",
"}"
] |
[
"perform",
"a",
"compare",
"and",
"set",
"operation",
"on",
"the",
"sequence"
] |
[
"public",
"boolean",
"compare",
"and",
"set",
"(",
"final",
"long",
"expected",
"value",
",",
"final",
"long",
"new",
"value",
")",
"{",
"return",
"unsafe",
"compare",
"and",
"swap",
"long",
"(",
"this",
",",
"value",
"offset",
",",
"expected",
"value",
",",
"new",
"value",
")",
";",
"}"
] |
[
"if",
"token",
"returned",
"is",
"null",
",",
"save",
"delegation",
"token",
"should",
"not",
"throw",
"null",
"pointer",
"exception"
] |
[
"public",
"void",
"test",
"returned",
"token",
"is",
"null",
"(",
")",
"throws",
"exception",
"{",
"web",
"hdfs",
"file",
"system",
"fs",
"=",
"mock",
"(",
"web",
"hdfs",
"file",
"system",
"class",
")",
";",
"do",
"return",
"(",
"null",
")",
"when",
"(",
"fs",
")",
"get",
"delegation",
"token",
"(",
"any",
"string",
"(",
")",
")",
";",
"path",
"p",
"=",
"new",
"path",
"(",
"f",
"get",
"root",
"(",
")",
"get",
"absolute",
"path",
"(",
")",
",",
"token",
"file",
")",
";",
"delegation",
"token",
"fetcher",
"save",
"delegation",
"token",
"(",
"conf",
",",
"fs",
",",
"null",
",",
"p",
")",
";",
"/",
"/",
"when",
"token",
"returned",
"is",
"null",
",",
"token",
"file",
"should",
"not",
"exist",
"assert",
"assert",
"false",
"(",
"p",
"get",
"file",
"system",
"(",
"conf",
")",
"exists",
"(",
"p",
")",
")",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"parse",
"the",
"given",
"string",
"into",
"date",
"object"
] |
[
"public",
"date",
"parse",
"date",
"(",
"string",
"str",
")",
"{",
"try",
"{",
"return",
"date",
"format",
"parse",
"(",
"str",
")",
";",
"}",
"catch",
"(",
"java",
"text",
"parse",
"exception",
"e",
")",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"callback",
"on",
"a",
"write",
"failure"
] |
[
"public",
"void",
"write",
"failed",
"(",
"exception",
"ex",
")",
"{",
"log",
"debug",
"(",
"\"",
"write",
"to",
"{",
"}",
"failed",
"\"",
",",
"this",
",",
"ex",
")",
";",
"}"
] |
[
"marks",
"the",
"given",
"text",
"as",
"html",
"in",
"order",
"to",
"be",
"rendered",
"thusly",
"by",
"java",
"widgets"
] |
[
"public",
"static",
"string",
"wrap",
"as",
"h",
"t",
"m",
"l",
"(",
"string",
"text",
")",
"{",
"return",
"html",
"+",
"fixup",
"h",
"t",
"m",
"l",
"rendering",
"issues",
"(",
"text",
")",
";",
"}"
] |
[
"creates",
"both",
"normal",
"and",
"scheduling",
"middlemen",
"note",
":",
"there",
"'",
"s",
"no",
"need",
"to",
"synchronize",
"this",
"method",
";",
"the",
"only",
"use",
"of",
"a",
"field",
"is",
"via",
"a",
"call",
"to",
"another",
"synchronized",
"method",
"(",
"get",
"artifact",
"(",
")",
")"
] |
[
"private",
"pair",
"<",
"artifact",
",",
"action",
">",
"create",
"middleman",
"(",
"action",
"owner",
"owner",
",",
"string",
"middleman",
"name",
",",
"string",
"purpose",
",",
"nested",
"set",
"<",
"artifact",
">",
"inputs",
",",
"artifact",
"root",
"middleman",
"dir",
",",
"middleman",
"type",
"middleman",
"type",
")",
"{",
"if",
"(",
"inputs",
"=",
"=",
"null",
"|",
"|",
"inputs",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"artifact",
"stamp",
"file",
"=",
"get",
"stamp",
"file",
"artifact",
"(",
"middleman",
"name",
",",
"purpose",
",",
"middleman",
"dir",
")",
";",
"action",
"action",
"=",
"middleman",
"action",
"create",
"(",
"action",
"registry",
",",
"owner",
",",
"inputs",
",",
"stamp",
"file",
",",
"purpose",
",",
"middleman",
"type",
")",
";",
"return",
"pair",
"of",
"(",
"stamp",
"file",
",",
"action",
")",
";",
"}"
] |
[
"process",
"params",
"from",
"command",
"line",
"and",
"run",
"set",
"of",
"benchmarks",
"specified"
] |
[
"public",
"int",
"run",
"(",
"string",
"[",
"]",
"argv",
")",
"throws",
"i",
"o",
"exception",
"{",
"job",
"conf",
"job",
"=",
"new",
"job",
"conf",
"(",
"get",
"conf",
"(",
")",
")",
";",
"enum",
"set",
"<",
"c",
"codec",
">",
"cc",
"=",
"null",
";",
"enum",
"set",
"<",
"c",
"type",
">",
"ct",
"=",
"null",
";",
"enum",
"set",
"<",
"format",
">",
"f",
"=",
"null",
";",
"enum",
"set",
"<",
"rw",
">",
"rw",
"=",
"null",
";",
"path",
"root",
"=",
"null",
";",
"file",
"system",
"fs",
"=",
"file",
"system",
"get",
"(",
"job",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"argv",
"length",
";",
"+",
"+",
"i",
")",
"{",
"try",
"{",
"if",
"(",
"\"",
"-",
"dir",
"\"",
"equals",
"(",
"argv",
"[",
"i",
"]",
")",
")",
"{",
"root",
"=",
"fs",
"make",
"qualified",
"(",
"new",
"path",
"(",
"argv",
"[",
"+",
"+",
"i",
"]",
")",
")",
";",
"system",
"out",
"println",
"(",
"\"",
"dir",
":",
"\"",
"+",
"root",
"to",
"string",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"seed",
"\"",
"equals",
"(",
"argv",
"[",
"i",
"]",
")",
")",
"{",
"job",
"set",
"long",
"(",
"\"",
"filebench",
"seed",
"\"",
",",
"long",
"value",
"of",
"(",
"argv",
"[",
"+",
"+",
"i",
"]",
")",
")",
";",
"}",
"else",
"if",
"(",
"argv",
"[",
"i",
"]",
"starts",
"with",
"(",
"\"",
"-",
"no",
"\"",
")",
")",
"{",
"string",
"arg",
"=",
"argv",
"[",
"i",
"]",
"substring",
"(",
"3",
")",
";",
"cc",
"=",
"rem",
"(",
"c",
"codec",
"class",
",",
"cc",
",",
"arg",
")",
";",
"ct",
"=",
"rem",
"(",
"c",
"type",
"class",
",",
"ct",
",",
"arg",
")",
";",
"f",
"=",
"rem",
"(",
"format",
"class",
",",
"f",
",",
"arg",
")",
";",
"rw",
"=",
"rem",
"(",
"rw",
"class",
",",
"rw",
",",
"arg",
")",
";",
"}",
"else",
"{",
"string",
"arg",
"=",
"argv",
"[",
"i",
"]",
"substring",
"(",
"1",
")",
";",
"cc",
"=",
"add",
"(",
"c",
"codec",
"class",
",",
"cc",
",",
"arg",
")",
";",
"ct",
"=",
"add",
"(",
"c",
"type",
"class",
",",
"ct",
",",
"arg",
")",
";",
"f",
"=",
"add",
"(",
"format",
"class",
",",
"f",
",",
"arg",
")",
";",
"rw",
"=",
"add",
"(",
"rw",
"class",
",",
"rw",
",",
"arg",
")",
";",
"}",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"(",
"i",
"o",
"exception",
")",
"new",
"i",
"o",
"exception",
"(",
")",
"init",
"cause",
"(",
"e",
")",
";",
"}",
"}",
"if",
"(",
"null",
"=",
"=",
"root",
")",
"{",
"system",
"out",
"println",
"(",
"\"",
"missing",
"-",
"dir",
"param",
"\"",
")",
";",
"print",
"usage",
"(",
")",
";",
"return",
"-",
"1",
";",
"}",
"fill",
"blocks",
"(",
"job",
")",
";",
"job",
"set",
"output",
"key",
"class",
"(",
"text",
"class",
")",
";",
"job",
"set",
"output",
"value",
"class",
"(",
"text",
"class",
")",
";",
"file",
"input",
"format",
"set",
"input",
"paths",
"(",
"job",
",",
"root",
")",
";",
"file",
"output",
"format",
"set",
"output",
"path",
"(",
"job",
",",
"root",
")",
";",
"if",
"(",
"null",
"=",
"=",
"cc",
")",
"cc",
"=",
"enum",
"set",
"all",
"of",
"(",
"c",
"codec",
"class",
")",
";",
"if",
"(",
"null",
"=",
"=",
"ct",
")",
"ct",
"=",
"enum",
"set",
"all",
"of",
"(",
"c",
"type",
"class",
")",
";",
"if",
"(",
"null",
"=",
"=",
"f",
")",
"f",
"=",
"enum",
"set",
"all",
"of",
"(",
"format",
"class",
")",
";",
"if",
"(",
"null",
"=",
"=",
"rw",
")",
"rw",
"=",
"enum",
"set",
"all",
"of",
"(",
"rw",
"class",
")",
";",
"for",
"(",
"rw",
"rwop",
":",
"rw",
")",
"{",
"for",
"(",
"format",
"fmt",
":",
"f",
")",
"{",
"fmt",
"configure",
"(",
"job",
")",
";",
"for",
"(",
"c",
"codec",
"cod",
":",
"cc",
")",
"{",
"cod",
"configure",
"(",
"job",
")",
";",
"if",
"(",
"!",
"(",
"fmt",
"=",
"=",
"format",
"txt",
"|",
"|",
"cod",
"=",
"=",
"c",
"codec",
"pln",
")",
")",
"{",
"for",
"(",
"c",
"type",
"typ",
":",
"ct",
")",
"{",
"string",
"fn",
"=",
"string",
"utils",
"to",
"upper",
"case",
"(",
"fmt",
"name",
"(",
")",
")",
"+",
"\"",
"\"",
"+",
"string",
"utils",
"to",
"upper",
"case",
"(",
"cod",
"name",
"(",
")",
")",
"+",
"\"",
"\"",
"+",
"string",
"utils",
"to",
"upper",
"case",
"(",
"typ",
"name",
"(",
")",
")",
";",
"typ",
"configure",
"(",
"job",
")",
";",
"system",
"out",
"print",
"(",
"string",
"utils",
"to",
"upper",
"case",
"(",
"rwop",
"name",
"(",
")",
")",
"+",
"\"",
"\"",
"+",
"fn",
"+",
"\"",
":",
"\"",
")",
";",
"system",
"out",
"println",
"(",
"rwop",
"exec",
"(",
"fn",
",",
"job",
")",
"/",
"1000",
"+",
"\"",
"seconds",
"\"",
")",
";",
"}",
"}",
"else",
"{",
"string",
"fn",
"=",
"string",
"utils",
"to",
"upper",
"case",
"(",
"fmt",
"name",
"(",
")",
")",
"+",
"\"",
"\"",
"+",
"string",
"utils",
"to",
"upper",
"case",
"(",
"cod",
"name",
"(",
")",
")",
";",
"path",
"p",
"=",
"new",
"path",
"(",
"root",
",",
"fn",
")",
";",
"if",
"(",
"rwop",
"=",
"=",
"rw",
"r",
"&",
"&",
"!",
"fs",
"exists",
"(",
"p",
")",
")",
"{",
"fn",
"+",
"=",
"cod",
"get",
"ext",
"(",
")",
";",
"}",
"system",
"out",
"print",
"(",
"string",
"utils",
"to",
"upper",
"case",
"(",
"rwop",
"name",
"(",
")",
")",
"+",
"\"",
"\"",
"+",
"fn",
"+",
"\"",
":",
"\"",
")",
";",
"system",
"out",
"println",
"(",
"rwop",
"exec",
"(",
"fn",
",",
"job",
")",
"/",
"1000",
"+",
"\"",
"seconds",
"\"",
")",
";",
"}",
"}",
"}",
"}",
"return",
"0",
";",
"}"
] |
[
"discovers",
"the",
"appropriate",
"{",
"@",
"link",
"cluster",
"client",
"factory",
"}",
"based",
"on",
"the",
"provided",
"configuration"
] |
[
"<",
"cluster",
"i",
"d",
">",
"cluster",
"client",
"factory",
"<",
"cluster",
"i",
"d",
">",
"get",
"cluster",
"client",
"factory",
"(",
"final",
"configuration",
"configuration",
")",
";"
] |
[
"set",
"the",
"<",
"code",
">",
"execution",
"type",
"request",
"<",
"code",
">",
"of",
"the",
"request",
"with",
"'",
"ensure",
"execution",
"type",
"'",
"flag",
"set",
"to",
"true"
] |
[
"public",
"resource",
"request",
"builder",
"execution",
"type",
"(",
"execution",
"type",
"execution",
"type",
")",
"{",
"resource",
"request",
"set",
"execution",
"type",
"request",
"(",
"execution",
"type",
"request",
"new",
"instance",
"(",
"execution",
"type",
",",
"true",
")",
")",
";",
"return",
"this",
";",
"}"
] |
[
"returns",
"whether",
"the",
"exception",
"'",
"s",
"try",
"block",
"overlaps",
"with",
"the",
"specified",
"block",
"of",
"instructions"
] |
[
"public",
"boolean",
"is",
"applicable",
"(",
"int",
"start",
"offset",
",",
"int",
"end",
"offset",
")",
"{",
"return",
"u",
"2start",
"p",
"c",
"<",
"end",
"offset",
"&",
"&",
"u",
"2end",
"p",
"c",
">",
"start",
"offset",
";",
"}"
] |
[
"permanently",
"scales",
"the",
"size",
"of",
"the",
"emitter",
"by",
"scaling",
"all",
"its",
"ranged",
"values",
"related",
"to",
"size"
] |
[
"public",
"void",
"scale",
"size",
"(",
"float",
"scale",
")",
"{",
"if",
"(",
"scale",
"=",
"=",
"1f",
")",
"return",
";",
"scale",
"size",
"(",
"scale",
",",
"scale",
")",
";",
"}"
] |
[
"runs",
"a",
"gather",
"-",
"sum",
"-",
"apply",
"iteration",
"on",
"the",
"graph",
"no",
"configuration",
"options",
"are",
"provided"
] |
[
"public",
"<",
"m",
">",
"graph",
"<",
"k",
",",
"vv",
",",
"ev",
">",
"run",
"gather",
"sum",
"apply",
"iteration",
"(",
"org",
"apache",
"flink",
"graph",
"gsa",
"gather",
"function",
"<",
"vv",
",",
"ev",
",",
"m",
">",
"gather",
"function",
",",
"sum",
"function",
"<",
"vv",
",",
"ev",
",",
"m",
">",
"sum",
"function",
",",
"apply",
"function",
"<",
"k",
",",
"vv",
",",
"m",
">",
"apply",
"function",
",",
"int",
"maximum",
"number",
"of",
"iterations",
")",
"{",
"return",
"this",
"run",
"gather",
"sum",
"apply",
"iteration",
"(",
"gather",
"function",
",",
"sum",
"function",
",",
"apply",
"function",
",",
"maximum",
"number",
"of",
"iterations",
",",
"null",
")",
";",
"}"
] |
[
"iterates",
"over",
"the",
"file",
"tree",
"of",
"a",
"directory",
"it",
"receives",
"a",
"visitor",
"and",
"will",
"call",
"its",
"methods",
"for",
"each",
"file",
"in",
"the",
"directory",
"pre",
"visit",
"directory",
"(",
"directory",
")",
"visit",
"file",
"(",
"file",
")",
"-",
"recursively",
"the",
"same",
"for",
"every",
"subdirectory",
"post",
"visit",
"directory",
"(",
"directory",
")"
] |
[
"public",
"static",
"void",
"walk",
"file",
"tree",
"(",
"file",
"directory",
",",
"file",
"tree",
"visitor",
"visitor",
")",
"{",
"visitor",
"pre",
"visit",
"directory",
"(",
"directory",
")",
";",
"file",
"[",
"]",
"files",
"=",
"directory",
"list",
"files",
"(",
")",
";",
"if",
"(",
"files",
"!",
"=",
"null",
")",
"{",
"for",
"(",
"file",
"file",
":",
"files",
")",
"{",
"if",
"(",
"file",
"is",
"directory",
"(",
")",
")",
"{",
"walk",
"file",
"tree",
"(",
"file",
",",
"visitor",
")",
";",
"}",
"else",
"{",
"visitor",
"visit",
"file",
"(",
"file",
")",
";",
"}",
"}",
"}",
"visitor",
"post",
"visit",
"directory",
"(",
"directory",
")",
";",
"}"
] |
[
"list",
"up",
"files",
"in",
"this",
"directory",
"that",
"matches",
"the",
"given",
"ant",
"-",
"style",
"filter"
] |
[
"public",
"file",
"path",
"[",
"]",
"list",
"(",
"final",
"string",
"includes",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
"{",
"return",
"list",
"(",
"includes",
",",
"null",
")",
";",
"}"
] |
[
"create",
"a",
"response",
"for",
"the",
"given",
"request"
] |
[
"client",
"http",
"response",
"create",
"response",
"(",
"@",
"nullable",
"client",
"http",
"request",
"request",
")",
"throws",
"i",
"o",
"exception",
";"
] |
[
"loads",
"a",
"domain",
"key",
"pair",
"if",
"the",
"file",
"does",
"not",
"exist",
",",
"a",
"new",
"key",
"pair",
"is",
"generated",
"and",
"saved"
] |
[
"private",
"key",
"pair",
"load",
"or",
"create",
"domain",
"key",
"pair",
"(",
")",
"throws",
"exception",
"{",
"val",
"acme",
"=",
"cas",
"properties",
"get",
"acme",
"(",
")",
";",
"return",
"load",
"or",
"create",
"key",
"pair",
"(",
"acme",
"get",
"domain",
"key",
"(",
")",
"get",
"location",
"(",
")",
"get",
"file",
"(",
")",
")",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"array",
"item",
"'"
] |
[
"public",
"void",
"array",
"item",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"array",
"item",
"}"
] |
[
"returns",
"the",
"updater",
"that",
"is",
"used",
"to",
"modify",
"the",
"primary",
"graph",
"viewer"
] |
[
"public",
"default",
"visual",
"graph",
"view",
"updater",
"<",
"v",
",",
"e",
">",
"get",
"view",
"updater",
"(",
"mouse",
"event",
"e",
")",
"{",
"graph",
"viewer",
"<",
"v",
",",
"e",
">",
"viewer",
"=",
"get",
"graph",
"viewer",
"(",
"e",
")",
";",
"visual",
"graph",
"view",
"updater",
"<",
"v",
",",
"e",
">",
"updater",
"=",
"viewer",
"get",
"view",
"updater",
"(",
")",
";",
"return",
"updater",
";",
"}"
] |
[
"string",
"(",
"char",
",",
"char",
")",
","
] |
[
"public",
"static",
"string",
"replace",
"first",
"(",
"@",
"nullable",
"string",
"s",
",",
"char",
"sub",
",",
"char",
"with",
")",
"{",
"if",
"(",
"s",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"index",
"=",
"s",
"index",
"of",
"(",
"sub",
")",
";",
"if",
"(",
"index",
"=",
"=",
"-",
"1",
")",
"{",
"return",
"s",
";",
"}",
"char",
"[",
"]",
"str",
"=",
"s",
"to",
"char",
"array",
"(",
")",
";",
"str",
"[",
"index",
"]",
"=",
"with",
";",
"return",
"new",
"string",
"(",
"str",
")",
";",
"}"
] |
[
"put",
"logout",
"redirect",
"url"
] |
[
"public",
"static",
"void",
"put",
"logout",
"redirect",
"url",
"(",
"final",
"http",
"servlet",
"request",
"request",
",",
"final",
"string",
"service",
")",
"{",
"request",
"set",
"attribute",
"(",
"\"",
"logout",
"redirect",
"url",
"\"",
",",
"service",
")",
";",
"}"
] |
[
"visits",
"a",
"line",
"number",
"declaration"
] |
[
"public",
"void",
"visit",
"line",
"number",
"(",
"final",
"int",
"line",
",",
"final",
"label",
"start",
")",
"{",
"if",
"(",
"mv",
"!",
"=",
"null",
")",
"{",
"mv",
"visit",
"line",
"number",
"(",
"line",
",",
"start",
")",
";",
"}",
"}"
] |
[
"broadcasts",
"the",
"event",
"to",
"all",
"of",
"the",
"interested",
"listener",
"'",
"s",
"dispatch",
"queues"
] |
[
"private",
"void",
"publish",
"(",
"cache",
"<",
"k",
",",
"v",
">",
"cache",
",",
"event",
"type",
"event",
"type",
",",
"k",
"key",
",",
"boolean",
"has",
"old",
"value",
",",
"@",
"nullable",
"v",
"old",
"value",
",",
"@",
"nullable",
"v",
"new",
"value",
",",
"boolean",
"quiet",
")",
"{",
"if",
"(",
"dispatch",
"queues",
"is",
"empty",
"(",
")",
")",
"{",
"return",
";",
"}",
"j",
"cache",
"entry",
"event",
"<",
"k",
",",
"v",
">",
"event",
"=",
"null",
";",
"for",
"(",
"registration",
"<",
"k",
",",
"v",
">",
"registration",
":",
"dispatch",
"queues",
"key",
"set",
"(",
")",
")",
"{",
"if",
"(",
"!",
"registration",
"get",
"cache",
"entry",
"listener",
"(",
")",
"is",
"compatible",
"(",
"event",
"type",
")",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"event",
"=",
"=",
"null",
")",
"{",
"event",
"=",
"new",
"j",
"cache",
"entry",
"event",
"<",
">",
"(",
"cache",
",",
"event",
"type",
",",
"key",
",",
"has",
"old",
"value",
",",
"old",
"value",
",",
"new",
"value",
")",
";",
"}",
"if",
"(",
"!",
"registration",
"get",
"cache",
"entry",
"filter",
"(",
")",
"evaluate",
"(",
"event",
")",
")",
"{",
"continue",
";",
"}",
"j",
"cache",
"entry",
"event",
"<",
"k",
",",
"v",
">",
"e",
"=",
"event",
";",
"completable",
"future",
"<",
"void",
">",
"future",
"=",
"dispatch",
"queues",
"compute",
"if",
"present",
"(",
"registration",
",",
"(",
"k",
",",
"queue",
")",
"-",
">",
"{",
"runnable",
"action",
"=",
"(",
")",
"-",
">",
"registration",
"get",
"cache",
"entry",
"listener",
"(",
")",
"dispatch",
"(",
"e",
")",
";",
"return",
"queue",
"then",
"run",
"async",
"(",
"action",
",",
"executor",
")",
";",
"}",
")",
";",
"if",
"(",
"(",
"future",
"!",
"=",
"null",
")",
"&",
"&",
"registration",
"is",
"synchronous",
"(",
")",
"&",
"&",
"!",
"quiet",
")",
"{",
"pending",
"get",
"(",
")",
"add",
"(",
"future",
")",
";",
"}",
"}",
"}"
] |
[
"returns",
"the",
"value",
"of",
"the",
"collection",
"timeout",
"configured",
"for",
"the",
"current",
"{",
"@",
"link",
"collector",
"}"
] |
[
"public",
"time",
"value",
"get",
"collection",
"timeout",
"(",
")",
"{",
"if",
"(",
"collection",
"timeout",
"setting",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"cluster",
"service",
"get",
"cluster",
"settings",
"(",
")",
"get",
"(",
"collection",
"timeout",
"setting",
")",
";",
"}"
] |
[
"adds",
"a",
"namevalue",
"pair",
"to",
"the",
"formatted",
"output",
"in",
"{",
"@",
"code",
"name",
"=",
"value",
"}",
"format"
] |
[
"public",
"to",
"string",
"helper",
"add",
"(",
"string",
"name",
",",
"boolean",
"value",
")",
"{",
"return",
"add",
"holder",
"(",
"name",
",",
"string",
"value",
"of",
"(",
"value",
")",
")",
";",
"}"
] |
[
"retrieves",
"roles",
"from",
"the",
"native",
"roles",
"store",
"see",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchreferencecurrentsecurity",
"-",
"api",
"-",
"get",
"-",
"role",
"html",
"\"",
">",
"the",
"docs",
"for",
"more"
] |
[
"public",
"get",
"roles",
"response",
"get",
"roles",
"(",
"final",
"get",
"roles",
"request",
"request",
",",
"final",
"request",
"options",
"options",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"rest",
"high",
"level",
"client",
"perform",
"request",
"and",
"parse",
"entity",
"(",
"request",
",",
"security",
"request",
"converters",
":",
":",
"get",
"roles",
",",
"options",
",",
"get",
"roles",
"response",
":",
":",
"from",
"x",
"content",
",",
"empty",
"set",
"(",
")",
")",
";",
"}"
] |
[
"try",
"starting",
"to",
"run",
"a",
"snapshot",
"finalization",
"or",
"snapshot",
"delete",
"for",
"the",
"given",
"repository",
"if",
"this",
"method",
"returns",
"{",
"@",
"code",
"true",
"}",
"then",
"snapshot",
"finalizations",
"and",
"deletions",
"for",
"the",
"repo",
"may",
"be",
"executed",
"once",
"no",
"more",
"operations",
"are",
"ready",
"for",
"the",
"repository",
"{",
"@",
"link",
"#",
"leave",
"repo",
"loop",
"(",
"string",
")",
"}",
"should",
"be",
"invoked",
"so",
"that",
"a",
"subsequent",
"state",
"change",
"that",
"causes",
"another",
"operation",
"to",
"become",
"ready",
"can",
"execute"
] |
[
"private",
"boolean",
"try",
"enter",
"repo",
"loop",
"(",
"string",
"repository",
")",
"{",
"return",
"currently",
"finalizing",
"add",
"(",
"repository",
")",
";",
"}"
] |
[
"split",
"on",
"space",
"and",
"trim",
"results"
] |
[
"public",
"static",
"iterable",
"<",
"string",
">",
"split",
"(",
"char",
"sequence",
"s",
")",
"{",
"return",
"ssv",
"splitter",
"split",
"(",
"s",
")",
";",
"}"
] |
[
"returns",
"the",
"program",
"header",
"at",
"the",
"specified",
"address",
",",
"or",
"null",
"if",
"no",
"program",
"header",
"exists",
"at",
"that",
"address"
] |
[
"public",
"elf",
"program",
"header",
"get",
"program",
"header",
"at",
"(",
"long",
"virtual",
"addr",
")",
"{",
"for",
"(",
"elf",
"program",
"header",
"program",
"header",
":",
"program",
"headers",
")",
"{",
"if",
"(",
"program",
"header",
"get",
"virtual",
"address",
"(",
")",
"=",
"=",
"virtual",
"addr",
")",
"{",
"return",
"program",
"header",
";",
"}",
"}",
"return",
"null",
";",
"}"
] |
[
"returns",
"the",
"names",
"of",
"the",
"starlark",
"fields",
"of",
"{",
"@",
"code",
"x",
"}",
"under",
"the",
"specified",
"semantics"
] |
[
"static",
"immutable",
"set",
"<",
"string",
">",
"get",
"annotated",
"field",
"names",
"(",
"starlark",
"semantics",
"semantics",
",",
"object",
"x",
")",
"{",
"return",
"get",
"cache",
"value",
"(",
"x",
"get",
"class",
"(",
")",
",",
"semantics",
")",
"fields",
"key",
"set",
"(",
")",
";",
"}"
] |
[
"returns",
"a",
"language",
"translation",
"for",
"a",
"language",
"version",
"which",
"is",
"no",
"longer",
"supported"
] |
[
"public",
"language",
"translator",
"get",
"language",
"translator",
"(",
"language",
"i",
"d",
"language",
"name",
",",
"int",
"major",
"version",
")",
"{",
"list",
"<",
"language",
"translator",
">",
"language",
"translator",
"list",
"=",
"translator",
"map",
"get",
"(",
"language",
"name",
")",
";",
"if",
"(",
"language",
"translator",
"list",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"language",
"translator",
"translator",
":",
"language",
"translator",
"list",
")",
"{",
"if",
"(",
"translator",
"get",
"old",
"version",
"(",
")",
"<",
"major",
"version",
")",
"{",
"continue",
";",
"}",
"translator",
"=",
"expand",
"translator",
"(",
"translator",
",",
"major",
"version",
")",
";",
"if",
"(",
"translator",
"!",
"=",
"null",
")",
"{",
"return",
"translator",
";",
"}",
"}",
"return",
"null",
";",
"}"
] |
[
"assert",
"that",
"a",
"path",
"does",
"not",
"exist"
] |
[
"public",
"static",
"void",
"assert",
"path",
"does",
"not",
"exist",
"(",
"file",
"system",
"file",
"system",
",",
"string",
"message",
",",
"path",
"path",
")",
"throws",
"i",
"o",
"exception",
"{",
"try",
"{",
"file",
"status",
"status",
"=",
"file",
"system",
"get",
"file",
"status",
"(",
"path",
")",
";",
"fail",
"(",
"message",
"+",
"\"",
":",
"unexpectedly",
"found",
"\"",
"+",
"path",
"+",
"\"",
"as",
"\"",
"+",
"status",
")",
";",
"}",
"catch",
"(",
"file",
"not",
"found",
"exception",
"expected",
")",
"{",
"/",
"/",
"this",
"is",
"expected",
"}",
"}"
] |
[
"atomically",
"write",
"the",
"given",
"value",
"to",
"the",
"given",
"file",
",",
"including",
"fsyncing"
] |
[
"public",
"static",
"void",
"write",
"file",
"(",
"file",
"file",
",",
"long",
"val",
")",
"throws",
"i",
"o",
"exception",
"{",
"atomic",
"file",
"output",
"stream",
"fos",
"=",
"new",
"atomic",
"file",
"output",
"stream",
"(",
"file",
")",
";",
"try",
"{",
"fos",
"write",
"(",
"string",
"value",
"of",
"(",
"val",
")",
"get",
"bytes",
"(",
"charsets",
"utf",
"8",
")",
")",
";",
"fos",
"write",
"(",
"'",
"\\",
"n",
"'",
")",
";",
"fos",
"close",
"(",
")",
";",
"fos",
"=",
"null",
";",
"}",
"finally",
"{",
"if",
"(",
"fos",
"!",
"=",
"null",
")",
"{",
"fos",
"abort",
"(",
")",
";",
"}",
"}",
"}"
] |
[
"schedule",
"the",
"given",
"{",
"@",
"link",
"runnable",
"}",
",",
"invoking",
"it",
"at",
"the",
"specified",
"execution",
"time",
"execution",
"will",
"end",
"once",
"the",
"scheduler",
"shuts",
"down",
"or",
"the",
"returned",
"{",
"@",
"link",
"scheduled",
"future",
"}",
"gets",
"cancelled"
] |
[
"default",
"scheduled",
"future",
"<",
"?",
">",
"schedule",
"(",
"runnable",
"task",
",",
"instant",
"start",
"time",
")",
"{",
"return",
"schedule",
"(",
"task",
",",
"date",
"from",
"(",
"start",
"time",
")",
")",
";",
"}"
] |
[
"tool",
"config",
"was",
"added",
"to",
"the",
"project",
"toolchest"
] |
[
"public",
"void",
"tool",
"template",
"added",
"(",
"tool",
"template",
"tc",
")",
"{",
"populate",
"tool",
"menus",
"(",
"plugin",
"get",
"active",
"project",
"(",
")",
")",
";",
"}"
] |
[
"returns",
"the",
"number",
"of",
"edges",
"in",
"this",
"graph",
";",
"used",
"to",
"calculate",
"the",
"size",
"of",
"{",
"@",
"link",
"#",
"edges",
"(",
")",
"}",
"this",
"implementation",
"requires",
"o",
"(",
"|",
"n",
"|",
")",
"time",
"classes",
"extending",
"this",
"one",
"may",
"manually",
"keep",
"track",
"of",
"the",
"number",
"of",
"edges",
"as",
"the",
"graph",
"is",
"updated",
",",
"and",
"override",
"this",
"method",
"for",
"better",
"performance"
] |
[
"protected",
"long",
"edge",
"count",
"(",
")",
"{",
"long",
"degree",
"sum",
"=",
"0l",
";",
"for",
"(",
"n",
"node",
":",
"nodes",
"(",
")",
")",
"{",
"degree",
"sum",
"+",
"=",
"degree",
"(",
"node",
")",
";",
"}",
"/",
"/",
"according",
"to",
"the",
"degree",
"sum",
"formula",
",",
"this",
"is",
"equal",
"to",
"twice",
"the",
"number",
"of",
"edges",
"check",
"state",
"(",
"(",
"degree",
"sum",
"&",
"1",
")",
"=",
"=",
"0",
")",
";",
"return",
"degree",
"sum",
">",
">",
">",
"1",
";",
"}"
] |
[
"<",
"code",
">",
"optional",
"aapt",
"pb",
"symbol",
"status",
"visibility",
"visibility",
"=",
"1",
";",
"<",
"code",
">"
] |
[
"public",
"boolean",
"has",
"visibility",
"(",
")",
"{",
"return",
"instance",
"has",
"visibility",
"(",
")",
";",
"}"
] |
[
"returns",
"the",
"jars",
"in",
"the",
"platform",
"classpath"
] |
[
"public",
"immutable",
"set",
"<",
"path",
">",
"get",
"platform",
"jars",
"(",
")",
"{",
"return",
"platform",
"jars",
";",
"}"
] |
[
"filters",
"out",
"elements",
"that",
"don",
"'",
"t",
"pass",
"the",
"filter",
"predicate",
"similar",
"to",
"a",
"sql",
"where",
"clause",
"example",
":",
"{",
"@",
"code",
"tab",
"where",
"(",
"$",
"(",
"\"",
"name",
"\"",
")",
"is",
"equal",
"(",
"\"",
"fred",
"\"",
")",
")",
";",
"}",
"scala",
"example",
":",
"{",
"@",
"code",
"tab",
"where",
"(",
"$",
"\"",
"name",
"\"",
"=",
"=",
"=",
"\"",
"fred",
"\"",
")",
"}"
] |
[
"table",
"where",
"(",
"expression",
"predicate",
")",
";"
] |
[
"validates",
"configuration",
"before",
"execution"
] |
[
"private",
"void",
"check",
"config",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"outputs",
"size",
"(",
")",
"<",
"1",
")",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"require",
"at",
"least",
"one",
"output",
"file",
"\"",
")",
";",
"}",
"filter",
"=",
"filter",
"file",
"=",
"=",
"null",
"&",
"&",
"filter",
"input",
"stream",
"=",
"=",
"null",
"?",
"null",
":",
"read",
"paths",
"(",
"filter",
"file",
")",
";",
"}"
] |
[
"returns",
"the",
"path",
"to",
"the",
"keyword",
"version",
"of",
"this",
"field",
"if",
"this",
"field",
"is",
"text",
"and",
"it",
"has",
"a",
"subfield",
"that",
"is",
"indexed",
"as",
"keyword",
",",
"throws",
"an",
"exception",
"if",
"such",
"field",
"is",
"not",
"found",
"or",
"the",
"field",
"name",
"itself",
"in",
"all",
"other",
"cases",
"to",
"avoid",
"the",
"exception",
"{",
"@",
"link",
"es",
"field",
"#",
"get",
"exact",
"info",
"(",
")",
"}",
"should",
"be",
"used",
"beforehand",
",",
"to",
"check",
"if",
"an",
"exact",
"field",
"exists",
"and",
"if",
"not",
"get",
"the",
"error",
"message",
"which",
"explains",
"why",
"is",
"that"
] |
[
"public",
"es",
"field",
"get",
"exact",
"field",
"(",
")",
"{",
"return",
"this",
";",
"}"
] |
[
"gets",
"the",
"vbtable",
"displacement",
"for",
"this",
"rtti",
"1"
] |
[
"public",
"int",
"get",
"p",
"disp",
"(",
")",
"throws",
"invalid",
"data",
"type",
"exception",
"{",
"return",
"get",
"pmd",
"value",
"(",
"pdisp",
"ordinal",
")",
";",
"}"
] |
[
"returns",
"the",
"{",
"@",
"link",
"memory",
"block",
"source",
"info",
"}",
"object",
"for",
"this",
"sub",
"memory",
"block"
] |
[
"protected",
"final",
"memory",
"block",
"source",
"info",
"get",
"source",
"info",
"(",
"memory",
"block",
"block",
")",
"{",
"return",
"new",
"memory",
"block",
"source",
"info",
"d",
"b",
"(",
"block",
",",
"this",
")",
";",
"}"
] |
[
"returns",
"the",
"sub",
"save",
"state",
"associated",
"with",
"the",
"given",
"name"
] |
[
"public",
"save",
"state",
"get",
"save",
"state",
"(",
"string",
"name",
")",
"{",
"return",
"get",
"as",
"type",
"(",
"name",
",",
"null",
",",
"save",
"state",
"class",
")",
";",
"}"
] |
[
"if",
"the",
"specified",
"key",
"is",
"not",
"already",
"associated",
"with",
"a",
"value",
"(",
"or",
"is",
"mapped",
"to",
"null",
")",
",",
"attempts",
"to",
"compute",
"its",
"value",
"using",
"the",
"given",
"mapping",
"function",
"and",
"enters",
"it",
"into",
"this",
"map",
"unless",
"null",
"the",
"load",
"method",
"for",
"a",
"given",
"key",
"will",
"be",
"invoked",
"at",
"most",
"once",
"use",
"of",
"different",
"{",
"@",
"link",
"cache",
"loader",
"}",
"implementations",
"on",
"the",
"same",
"key",
"concurrently",
"may",
"result",
"in",
"only",
"the",
"first",
"loader",
"function",
"being",
"called",
"and",
"the",
"second",
"will",
"be",
"returned",
"the",
"result",
"provided",
"by",
"the",
"first",
"including",
"any",
"exceptions",
"thrown",
"during",
"the",
"execution",
"of",
"the",
"first"
] |
[
"public",
"v",
"compute",
"if",
"absent",
"(",
"k",
"key",
",",
"cache",
"loader",
"<",
"k",
",",
"v",
">",
"loader",
")",
"throws",
"execution",
"exception",
"{",
"long",
"now",
"=",
"now",
"(",
")",
";",
"/",
"/",
"we",
"have",
"to",
"eagerly",
"evict",
"expired",
"entries",
"or",
"our",
"put",
"if",
"absent",
"call",
"below",
"will",
"fail",
"v",
"value",
"=",
"get",
"(",
"key",
",",
"now",
",",
"e",
"-",
">",
"{",
"try",
"(",
"releasable",
"lock",
"ignored",
"=",
"lru",
"lock",
"acquire",
"(",
")",
")",
"{",
"evict",
"entry",
"(",
"e",
")",
";",
"}",
"}",
")",
";",
"if",
"(",
"value",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"we",
"need",
"to",
"synchronize",
"loading",
"of",
"a",
"value",
"for",
"a",
"given",
"key",
";",
"however",
",",
"holding",
"the",
"segment",
"lock",
"while",
"/",
"/",
"invoking",
"load",
"can",
"lead",
"to",
"deadlock",
"against",
"another",
"thread",
"due",
"to",
"dependent",
"key",
"loading",
";",
"therefore",
",",
"we",
"/",
"/",
"need",
"a",
"mechanism",
"to",
"ensure",
"that",
"load",
"is",
"invoked",
"at",
"most",
"once",
",",
"but",
"we",
"are",
"not",
"invoking",
"load",
"while",
"holding",
"/",
"/",
"the",
"segment",
"lock",
";",
"to",
"do",
"this",
",",
"we",
"atomically",
"put",
"a",
"future",
"in",
"the",
"map",
"that",
"can",
"load",
"the",
"value",
",",
"and",
"then",
"/",
"/",
"get",
"the",
"value",
"from",
"this",
"future",
"on",
"the",
"thread",
"that",
"won",
"the",
"race",
"to",
"place",
"the",
"future",
"into",
"the",
"segment",
"map",
"cache",
"segment",
"<",
"k",
",",
"v",
">",
"segment",
"=",
"get",
"cache",
"segment",
"(",
"key",
")",
";",
"completable",
"future",
"<",
"entry",
"<",
"k",
",",
"v",
">",
">",
"future",
";",
"completable",
"future",
"<",
"entry",
"<",
"k",
",",
"v",
">",
">",
"completable",
"future",
"=",
"new",
"completable",
"future",
"<",
">",
"(",
")",
";",
"try",
"(",
"releasable",
"lock",
"ignored",
"=",
"segment",
"write",
"lock",
"acquire",
"(",
")",
")",
"{",
"future",
"=",
"segment",
"map",
"put",
"if",
"absent",
"(",
"key",
",",
"completable",
"future",
")",
";",
"}",
"bi",
"function",
"<",
"?",
"super",
"entry",
"<",
"k",
",",
"v",
">",
",",
"throwable",
",",
"?",
"extends",
"v",
">",
"handler",
"=",
"(",
"ok",
",",
"ex",
")",
"-",
">",
"{",
"if",
"(",
"ok",
"!",
"=",
"null",
")",
"{",
"try",
"(",
"releasable",
"lock",
"ignored",
"=",
"lru",
"lock",
"acquire",
"(",
")",
")",
"{",
"promote",
"(",
"ok",
",",
"now",
")",
";",
"}",
"return",
"ok",
"value",
";",
"}",
"else",
"{",
"try",
"(",
"releasable",
"lock",
"ignored",
"=",
"segment",
"write",
"lock",
"acquire",
"(",
")",
")",
"{",
"completable",
"future",
"<",
"entry",
"<",
"k",
",",
"v",
">",
">",
"sanity",
"=",
"segment",
"map",
"get",
"(",
"key",
")",
";",
"if",
"(",
"sanity",
"!",
"=",
"null",
"&",
"&",
"sanity",
"is",
"completed",
"exceptionally",
"(",
")",
")",
"{",
"segment",
"map",
"remove",
"(",
"key",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"}",
";",
"completable",
"future",
"<",
"v",
">",
"completable",
"value",
";",
"if",
"(",
"future",
"=",
"=",
"null",
")",
"{",
"future",
"=",
"completable",
"future",
";",
"completable",
"value",
"=",
"future",
"handle",
"(",
"handler",
")",
";",
"v",
"loaded",
";",
"try",
"{",
"loaded",
"=",
"loader",
"load",
"(",
"key",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"future",
"complete",
"exceptionally",
"(",
"e",
")",
";",
"throw",
"new",
"execution",
"exception",
"(",
"e",
")",
";",
"}",
"if",
"(",
"loaded",
"=",
"=",
"null",
")",
"{",
"null",
"pointer",
"exception",
"npe",
"=",
"new",
"null",
"pointer",
"exception",
"(",
"\"",
"loader",
"returned",
"a",
"null",
"value",
"\"",
")",
";",
"future",
"complete",
"exceptionally",
"(",
"npe",
")",
";",
"throw",
"new",
"execution",
"exception",
"(",
"npe",
")",
";",
"}",
"else",
"{",
"future",
"complete",
"(",
"new",
"entry",
"<",
">",
"(",
"key",
",",
"loaded",
",",
"now",
")",
")",
";",
"}",
"}",
"else",
"{",
"completable",
"value",
"=",
"future",
"handle",
"(",
"handler",
")",
";",
"}",
"try",
"{",
"value",
"=",
"completable",
"value",
"get",
"(",
")",
";",
"/",
"/",
"check",
"to",
"ensure",
"the",
"future",
"hasn",
"'",
"t",
"been",
"completed",
"with",
"an",
"exception",
"if",
"(",
"future",
"is",
"completed",
"exceptionally",
"(",
")",
")",
"{",
"future",
"get",
"(",
")",
";",
"/",
"/",
"call",
"get",
"to",
"force",
"the",
"exception",
"to",
"be",
"thrown",
"for",
"other",
"concurrent",
"callers",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"the",
"future",
"was",
"completed",
"exceptionally",
"but",
"no",
"exception",
"was",
"thrown",
"\"",
")",
";",
"}",
"}",
"catch",
"(",
"interrupted",
"exception",
"e",
")",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"e",
")",
";",
"}",
"}",
"return",
"value",
";",
"}"
] |
[
",",
"[",
"]"
] |
[
"public",
"string",
"builder",
"get",
"(",
")",
"{",
"string",
"builder",
"sb",
"=",
"string",
"builder",
"get",
"(",
")",
";",
"sb",
"set",
"length",
"(",
"0",
")",
";",
"return",
"sb",
";",
"}"
] |
[
"returns",
"the",
"input",
"to",
"output",
"symbol",
"mapping",
"for",
"the",
"given",
"source",
"channel",
"a",
"single",
"input",
"symbol",
"can",
"map",
"to",
"multiple",
"output",
"symbols",
",",
"thus",
"requiring",
"a",
"multimap"
] |
[
"public",
"static",
"multimap",
"<",
"variable",
"reference",
"expression",
",",
"variable",
"reference",
"expression",
">",
"output",
"map",
"(",
"union",
"node",
"node",
",",
"int",
"source",
"index",
")",
"{",
"return",
"fluent",
"iterable",
"from",
"(",
"node",
"get",
"output",
"variables",
"(",
")",
")",
"to",
"map",
"(",
"output",
"-",
">",
"node",
"get",
"variable",
"mapping",
"(",
")",
"get",
"(",
"output",
")",
"get",
"(",
"source",
"index",
")",
")",
"as",
"multimap",
"(",
")",
"inverse",
"(",
")",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"color",
"'"
] |
[
"public",
"void",
"color",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"color",
"}"
] |
[
"creates",
"a",
"dynamic",
"field",
"based",
"on",
"the",
"value",
"of",
"the",
"current",
"token",
"being",
"parsed",
"from",
"an",
"incoming",
"document",
"makes",
"decisions",
"based",
"on",
"the",
"type",
"of",
"the",
"field",
"being",
"found",
",",
"looks",
"at",
"matching",
"dynamic",
"templates",
"and",
"delegates",
"to",
"the",
"appropriate",
"strategy",
"which",
"depends",
"on",
"the",
"current",
"dynamic",
"mode",
"the",
"strategy",
"defines",
"if",
"fields",
"are",
"going",
"to",
"be",
"mapped",
"as",
"ordinary",
"or",
"runtime",
"fields"
] |
[
"void",
"create",
"dynamic",
"field",
"from",
"value",
"(",
"final",
"parse",
"context",
"context",
",",
"x",
"content",
"parser",
"token",
"token",
",",
"string",
"name",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"token",
"=",
"=",
"x",
"content",
"parser",
"token",
"value",
"string",
")",
"{",
"string",
"text",
"=",
"context",
"parser",
"(",
")",
"text",
"(",
")",
";",
"boolean",
"parseable",
"as",
"long",
"=",
"false",
";",
"try",
"{",
"long",
"parse",
"long",
"(",
"text",
")",
";",
"parseable",
"as",
"long",
"=",
"true",
";",
"}",
"catch",
"(",
"number",
"format",
"exception",
"e",
")",
"{",
"/",
"/",
"not",
"a",
"long",
"number",
"}",
"boolean",
"parseable",
"as",
"double",
"=",
"false",
";",
"try",
"{",
"double",
"parse",
"double",
"(",
"text",
")",
";",
"parseable",
"as",
"double",
"=",
"true",
";",
"}",
"catch",
"(",
"number",
"format",
"exception",
"e",
")",
"{",
"/",
"/",
"not",
"a",
"double",
"number",
"}",
"if",
"(",
"parseable",
"as",
"long",
"&",
"&",
"context",
"root",
"(",
")",
"numeric",
"detection",
"(",
")",
")",
"{",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"long",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"long",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"else",
"if",
"(",
"parseable",
"as",
"double",
"&",
"&",
"context",
"root",
"(",
")",
"numeric",
"detection",
"(",
")",
")",
"{",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"double",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"double",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"else",
"if",
"(",
"parseable",
"as",
"long",
"=",
"=",
"false",
"&",
"&",
"parseable",
"as",
"double",
"=",
"=",
"false",
"&",
"&",
"context",
"root",
"(",
")",
"date",
"detection",
"(",
")",
")",
"{",
"/",
"/",
"we",
"refuse",
"to",
"match",
"pure",
"numbers",
",",
"which",
"are",
"too",
"likely",
"to",
"be",
"/",
"/",
"false",
"positives",
"with",
"date",
"formats",
"that",
"include",
"eg",
"/",
"/",
"`",
"epoch",
"millis",
"`",
"or",
"`",
"yyyy",
"`",
"for",
"(",
"date",
"formatter",
"date",
"time",
"formatter",
":",
"context",
"root",
"(",
")",
"dynamic",
"date",
"time",
"formatters",
"(",
")",
")",
"{",
"try",
"{",
"date",
"time",
"formatter",
"parse",
"(",
"text",
")",
";",
"}",
"catch",
"(",
"elasticsearch",
"parse",
"exception",
"|",
"date",
"time",
"parse",
"exception",
"|",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"/",
"/",
"failure",
"to",
"parse",
"this",
",",
"continue",
"continue",
";",
"}",
"create",
"dynamic",
"date",
"field",
"(",
"context",
",",
"name",
",",
"date",
"time",
"formatter",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"date",
"field",
"(",
"context",
",",
"name",
",",
"date",
"time",
"formatter",
")",
")",
";",
"return",
";",
"}",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"string",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"string",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"else",
"{",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"string",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"string",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"}",
"else",
"if",
"(",
"token",
"=",
"=",
"x",
"content",
"parser",
"token",
"value",
"number",
")",
"{",
"x",
"content",
"parser",
"number",
"type",
"number",
"type",
"=",
"context",
"parser",
"(",
")",
"number",
"type",
"(",
")",
";",
"if",
"(",
"number",
"type",
"=",
"=",
"x",
"content",
"parser",
"number",
"type",
"int",
"|",
"|",
"number",
"type",
"=",
"=",
"x",
"content",
"parser",
"number",
"type",
"long",
"|",
"|",
"number",
"type",
"=",
"=",
"x",
"content",
"parser",
"number",
"type",
"big",
"integer",
")",
"{",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"long",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"long",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"else",
"if",
"(",
"number",
"type",
"=",
"=",
"x",
"content",
"parser",
"number",
"type",
"float",
"|",
"|",
"number",
"type",
"=",
"=",
"x",
"content",
"parser",
"number",
"type",
"double",
"|",
"|",
"number",
"type",
"=",
"=",
"x",
"content",
"parser",
"number",
"type",
"big",
"decimal",
")",
"{",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"double",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"double",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"unable",
"to",
"parse",
"number",
"of",
"type",
"[",
"\"",
"+",
"number",
"type",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"}",
"else",
"if",
"(",
"token",
"=",
"=",
"x",
"content",
"parser",
"token",
"value",
"boolean",
")",
"{",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"boolean",
",",
"(",
")",
"-",
">",
"strategy",
"new",
"dynamic",
"boolean",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"else",
"if",
"(",
"token",
"=",
"=",
"x",
"content",
"parser",
"token",
"value",
"embedded",
"object",
")",
"{",
"/",
"/",
"runtime",
"binary",
"fields",
"are",
"not",
"supported",
",",
"hence",
"binary",
"objects",
"always",
"get",
"created",
"as",
"concrete",
"fields",
"create",
"dynamic",
"field",
"(",
"context",
",",
"name",
",",
"dynamic",
"template",
"x",
"content",
"field",
"type",
"binary",
",",
"(",
")",
"-",
">",
"concrete",
"new",
"dynamic",
"binary",
"field",
"(",
"context",
",",
"name",
")",
")",
";",
"}",
"else",
"{",
"create",
"dynamic",
"string",
"field",
"from",
"template",
"(",
"context",
",",
"name",
")",
";",
"}",
"}"
] |
[
"selects",
"a",
"(",
"preferably",
"master",
")",
"broker",
"address",
"from",
"the",
"registered",
"list",
"if",
"the",
"master",
"'",
"s",
"address",
"cannot",
"be",
"found",
",",
"a",
"slave",
"broker",
"address",
"is",
"selected",
"in",
"a",
"random",
"manner"
] |
[
"public",
"string",
"select",
"broker",
"addr",
"(",
")",
"{",
"string",
"addr",
"=",
"this",
"broker",
"addrs",
"get",
"(",
"mix",
"all",
"master",
"id",
")",
";",
"if",
"(",
"addr",
"=",
"=",
"null",
")",
"{",
"list",
"<",
"string",
">",
"addrs",
"=",
"new",
"array",
"list",
"<",
"string",
">",
"(",
"broker",
"addrs",
"values",
"(",
")",
")",
";",
"return",
"addrs",
"get",
"(",
"random",
"next",
"int",
"(",
"addrs",
"size",
"(",
")",
")",
")",
";",
"}",
"return",
"addr",
";",
"}"
] |
[
"commit",
"up",
"to",
"this",
"checkpoint",
"id"
] |
[
"protected",
"void",
"commit",
"up",
"to",
"checkpoint",
"(",
"long",
"checkpoint",
"id",
")",
"throws",
"exception",
"{",
"helper",
"commit",
"up",
"to",
"checkpoint",
"(",
"checkpoint",
"id",
")",
";",
"}"
] |
[
"model",
"tests",
"for",
"animal"
] |
[
"public",
"void",
"test",
"animal",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"animal",
"}"
] |
[
"extracts",
"job",
"i",
"d",
"string",
"from",
"the",
"given",
"job",
"conf",
"xml",
"file",
"name"
] |
[
"private",
"static",
"string",
"extract",
"job",
"i",
"d",
"from",
"conf",
"file",
"name",
"(",
"string",
"file",
"name",
")",
"{",
"/",
"/",
"history",
"conf",
"file",
"name",
"could",
"be",
"in",
"one",
"of",
"the",
"following",
"formats",
"/",
"/",
"(",
"1",
")",
"old",
"pre",
"2",
"1",
"job",
"history",
"file",
"name",
"format",
"/",
"/",
"(",
"2",
")",
"new",
"pre",
"2",
"1",
"job",
"history",
"file",
"name",
"format",
"/",
"/",
"(",
"3",
")",
"current",
"job",
"history",
"file",
"name",
"format",
"i",
"e",
"0",
"22",
"string",
"pre",
"2",
"1",
"job",
"i",
"d",
"=",
"apply",
"parser",
"(",
"file",
"name",
",",
"pre",
"2",
"1",
"job",
"history",
"constants",
"conf",
"filename",
"regex",
"v1",
")",
";",
"if",
"(",
"pre",
"2",
"1",
"job",
"i",
"d",
"=",
"=",
"null",
")",
"{",
"pre",
"2",
"1",
"job",
"i",
"d",
"=",
"apply",
"parser",
"(",
"file",
"name",
",",
"pre",
"2",
"1",
"job",
"history",
"constants",
"conf",
"filename",
"regex",
"v2",
")",
";",
"}",
"if",
"(",
"pre",
"2",
"1",
"job",
"i",
"d",
"!",
"=",
"null",
")",
"{",
"return",
"pre",
"2",
"1",
"job",
"i",
"d",
";",
"}",
"return",
"apply",
"parser",
"(",
"file",
"name",
",",
"job",
"history",
"conf",
"filename",
"regex",
")",
";",
"}"
] |
[
"updated",
"user",
"this",
"can",
"only",
"be",
"done",
"by",
"the",
"logged",
"in",
"user"
] |
[
"public",
"void",
"update",
"user",
"(",
"string",
"username",
",",
"user",
"user",
")",
"throws",
"api",
"exception",
"{",
"object",
"local",
"var",
"post",
"body",
"=",
"user",
";",
"/",
"/",
"verify",
"the",
"required",
"parameter",
"'",
"username",
"'",
"is",
"set",
"if",
"(",
"username",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"api",
"exception",
"(",
"400",
",",
"\"",
"missing",
"the",
"required",
"parameter",
"'",
"username",
"'",
"when",
"calling",
"update",
"user",
"\"",
")",
";",
"}",
"/",
"/",
"verify",
"the",
"required",
"parameter",
"'",
"user",
"'",
"is",
"set",
"if",
"(",
"user",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"api",
"exception",
"(",
"400",
",",
"\"",
"missing",
"the",
"required",
"parameter",
"'",
"user",
"'",
"when",
"calling",
"update",
"user",
"\"",
")",
";",
"}",
"/",
"/",
"create",
"path",
"and",
"map",
"variables",
"string",
"local",
"var",
"path",
"=",
"\"",
"/",
"user",
"/",
"{",
"username",
"}",
"\"",
"replace",
"all",
"(",
"\"",
"\\",
"\\",
"{",
"format",
"\\",
"\\",
"}",
"\"",
",",
"\"",
"json",
"\"",
")",
"replace",
"all",
"(",
"\"",
"\\",
"\\",
"{",
"\"",
"+",
"\"",
"username",
"\"",
"+",
"\"",
"\\",
"\\",
"}",
"\"",
",",
"api",
"invoker",
"escape",
"string",
"(",
"username",
"to",
"string",
"(",
")",
")",
")",
";",
"/",
"/",
"query",
"params",
"list",
"<",
"pair",
">",
"local",
"var",
"query",
"params",
"=",
"new",
"array",
"list",
"<",
"pair",
">",
"(",
")",
";",
"/",
"/",
"header",
"params",
"map",
"<",
"string",
",",
"string",
">",
"local",
"var",
"header",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"/",
"/",
"form",
"params",
"map",
"<",
"string",
",",
"string",
">",
"local",
"var",
"form",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"string",
"[",
"]",
"local",
"var",
"content",
"types",
"=",
"{",
"}",
";",
"string",
"local",
"var",
"content",
"type",
"=",
"local",
"var",
"content",
"types",
"length",
">",
"0",
"?",
"local",
"var",
"content",
"types",
"[",
"0",
"]",
":",
"\"",
"application",
"/",
"json",
"\"",
";",
"if",
"(",
"local",
"var",
"content",
"type",
"starts",
"with",
"(",
"\"",
"multipart",
"/",
"form",
"-",
"data",
"\"",
")",
")",
"{",
"/",
"/",
"file",
"uploading",
"multipart",
"entity",
"builder",
"local",
"var",
"builder",
"=",
"multipart",
"entity",
"builder",
"create",
"(",
")",
";",
"local",
"var",
"post",
"body",
"=",
"local",
"var",
"builder",
"build",
"(",
")",
";",
"}",
"else",
"{",
"/",
"/",
"normal",
"form",
"params",
"}",
"try",
"{",
"string",
"local",
"var",
"response",
"=",
"api",
"invoker",
"invoke",
"a",
"p",
"i",
"(",
"base",
"path",
",",
"local",
"var",
"path",
",",
"\"",
"put",
"\"",
",",
"local",
"var",
"query",
"params",
",",
"local",
"var",
"post",
"body",
",",
"local",
"var",
"header",
"params",
",",
"local",
"var",
"form",
"params",
",",
"local",
"var",
"content",
"type",
")",
";",
"if",
"(",
"local",
"var",
"response",
"!",
"=",
"null",
")",
"{",
"return",
";",
"}",
"else",
"{",
"return",
";",
"}",
"}",
"catch",
"(",
"api",
"exception",
"ex",
")",
"{",
"throw",
"ex",
";",
"}",
"}"
] |
[
"find",
"the",
"fields",
"constant",
"that",
"matches",
"name",
",",
"or",
"null",
"if",
"its",
"not",
"found"
] |
[
"public",
"static",
"fields",
"find",
"by",
"name",
"(",
"string",
"name",
")",
"{",
"return",
"by",
"name",
"get",
"(",
"name",
")",
";",
"}"
] |
[
"adds",
"the",
"given",
"highlight",
"to",
"this",
"container"
] |
[
"public",
"void",
"add",
"(",
"highlight",
"token",
"t",
")",
"{",
"highlights",
"by",
"token",
"put",
"(",
"get",
"key",
"(",
"t",
")",
",",
"t",
")",
";",
"}"
] |
[
"regression",
"test",
"for",
"hdfs",
"-",
"3357",
"check",
"that",
"the",
"datanode",
"is",
"respecting",
"its",
"configured",
"keepalive",
"timeout"
] |
[
"public",
"void",
"test",
"datanode",
"respects",
"keep",
"alive",
"timeout",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"client",
"conf",
"=",
"new",
"configuration",
"(",
"conf",
")",
";",
"/",
"/",
"set",
"a",
"client",
"socket",
"cache",
"expiry",
"time",
"much",
"longer",
"than",
"/",
"/",
"the",
"datanode",
"-",
"side",
"expiration",
"time",
"final",
"long",
"client",
"expiry",
"ms",
"=",
"60000l",
";",
"client",
"conf",
"set",
"long",
"(",
"dfs",
"client",
"socket",
"cache",
"expiry",
"msec",
"key",
",",
"client",
"expiry",
"ms",
")",
";",
"client",
"conf",
"set",
"(",
"dfs",
"client",
"context",
",",
"\"",
"test",
"datanode",
"respects",
"keep",
"alive",
"timeout",
"\"",
")",
";",
"distributed",
"file",
"system",
"fs",
"=",
"(",
"distributed",
"file",
"system",
")",
"file",
"system",
"get",
"(",
"cluster",
"get",
"u",
"r",
"i",
"(",
")",
",",
"client",
"conf",
")",
";",
"peer",
"cache",
"peer",
"cache",
"=",
"client",
"context",
"get",
"from",
"conf",
"(",
"client",
"conf",
")",
"get",
"peer",
"cache",
"(",
")",
";",
"d",
"f",
"s",
"test",
"util",
"create",
"file",
"(",
"fs",
",",
"test",
"file",
",",
"1l",
",",
"(",
"short",
")",
"1",
",",
"0l",
")",
";",
"/",
"/",
"clients",
"that",
"write",
"aren",
"'",
"t",
"currently",
"re",
"-",
"used",
"assert",
"equals",
"(",
"0",
",",
"peer",
"cache",
"size",
"(",
")",
")",
";",
"assert",
"xceiver",
"count",
"(",
"0",
")",
";",
"/",
"/",
"reads",
"the",
"file",
",",
"so",
"we",
"should",
"get",
"a",
"/",
"/",
"cached",
"socket",
",",
"and",
"should",
"have",
"an",
"xceiver",
"on",
"the",
"other",
"side",
"d",
"f",
"s",
"test",
"util",
"read",
"file",
"(",
"fs",
",",
"test",
"file",
")",
";",
"assert",
"equals",
"(",
"1",
",",
"peer",
"cache",
"size",
"(",
")",
")",
";",
"assert",
"xceiver",
"count",
"(",
"1",
")",
";",
"/",
"/",
"sleep",
"for",
"a",
"bit",
"longer",
"than",
"the",
"keepalive",
"timeout",
"/",
"/",
"and",
"make",
"sure",
"the",
"xceiver",
"died",
"thread",
"sleep",
"(",
"dfs",
"datanode",
"socket",
"reuse",
"keepalive",
"default",
"+",
"50",
")",
";",
"assert",
"xceiver",
"count",
"(",
"0",
")",
";",
"/",
"/",
"the",
"socket",
"is",
"still",
"in",
"the",
"cache",
",",
"because",
"we",
"don",
"'",
"t",
"/",
"/",
"notice",
"that",
"it",
"'",
"s",
"closed",
"until",
"we",
"try",
"to",
"read",
"/",
"/",
"from",
"it",
"again",
"assert",
"equals",
"(",
"1",
",",
"peer",
"cache",
"size",
"(",
")",
")",
";",
"/",
"/",
"take",
"it",
"out",
"of",
"the",
"cache",
"-",
"reading",
"should",
"/",
"/",
"give",
"an",
"eof",
"peer",
"peer",
"=",
"peer",
"cache",
"get",
"(",
"dn",
"get",
"datanode",
"id",
"(",
")",
",",
"false",
")",
";",
"assert",
"not",
"null",
"(",
"peer",
")",
";",
"assert",
"equals",
"(",
"-",
"1",
",",
"peer",
"get",
"input",
"stream",
"(",
")",
"read",
"(",
")",
")",
";",
"}"
] |
[
"shows",
"a",
"fading",
"label",
"at",
"the",
"top",
"of",
"the",
"screen"
] |
[
"public",
"void",
"show",
"info",
"toast",
"(",
"string",
"info",
",",
"float",
"duration",
")",
"{",
"table",
"table",
"=",
"new",
"table",
"(",
")",
";",
"table",
"set",
"fill",
"parent",
"(",
"true",
")",
";",
"table",
"touchable",
"=",
"touchable",
"disabled",
";",
"table",
"update",
"(",
"(",
")",
"-",
">",
"{",
"if",
"(",
"state",
"is",
"menu",
"(",
")",
")",
"table",
"remove",
"(",
")",
";",
"}",
")",
";",
"table",
"actions",
"(",
"actions",
"delay",
"(",
"duration",
"*",
"0",
"9f",
")",
",",
"actions",
"fade",
"out",
"(",
"duration",
"*",
"0",
"1f",
",",
"interp",
"fade",
")",
",",
"actions",
"remove",
"(",
")",
")",
";",
"table",
"top",
"(",
")",
"table",
"(",
"styles",
"black",
"3",
",",
"t",
"-",
">",
"t",
"margin",
"(",
"4",
")",
"add",
"(",
"info",
")",
"style",
"(",
"styles",
"outline",
"label",
")",
")",
"pad",
"top",
"(",
"10",
")",
";",
"core",
"scene",
"add",
"(",
"table",
")",
";",
"}"
] |
[
"init",
"the",
"the",
"list",
"of",
"stream",
"state",
"handle",
"-",
">",
"operator",
"state",
"handle",
"map",
"with",
"given",
"parallel",
"subtask",
"states",
"when",
"parallelism",
"not",
"changed"
] |
[
"private",
"list",
"<",
"map",
"<",
"stream",
"state",
"handle",
",",
"operator",
"state",
"handle",
">",
">",
"init",
"merge",
"map",
"list",
"(",
"list",
"<",
"list",
"<",
"operator",
"state",
"handle",
">",
">",
"parallel",
"subtask",
"states",
")",
"{",
"int",
"parallelism",
"=",
"parallel",
"subtask",
"states",
"size",
"(",
")",
";",
"final",
"list",
"<",
"map",
"<",
"stream",
"state",
"handle",
",",
"operator",
"state",
"handle",
">",
">",
"merge",
"map",
"list",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"parallelism",
")",
";",
"for",
"(",
"list",
"<",
"operator",
"state",
"handle",
">",
"previous",
"parallel",
"subtask",
"state",
":",
"parallel",
"subtask",
"states",
")",
"{",
"merge",
"map",
"list",
"add",
"(",
"previous",
"parallel",
"subtask",
"state",
"stream",
"(",
")",
"collect",
"(",
"collectors",
"to",
"map",
"(",
"operator",
"state",
"handle",
":",
":",
"get",
"delegate",
"state",
"handle",
",",
"function",
"identity",
"(",
")",
")",
")",
")",
";",
"}",
"return",
"merge",
"map",
"list",
";",
"}"
] |
[
"called",
"when",
"finishing",
"a",
"mount",
"where",
"the",
"mount",
"state",
"was",
"dirty",
"this",
"indicates",
"that",
"there",
"were",
"new",
"propsstate",
"in",
"the",
"tree",
",",
"or",
"the",
"litho",
"view",
"was",
"mounting",
"a",
"new",
"component",
"tree"
] |
[
"void",
"on",
"dirty",
"mount",
"(",
"litho",
"view",
"view",
")",
";"
] |
[
"for",
"this",
"test",
",",
"the",
"body",
"for",
"this",
"request",
"much",
"reference",
"a",
"schema",
"named",
"&",
"#",
"x",
"6",
"0",
";",
"file",
"&",
"#",
"x",
"6",
"0",
";"
] |
[
"public",
"void",
"test",
"body",
"with",
"file",
"schema",
"test",
"(",
")",
"throws",
"api",
"exception",
"{",
"file",
"schema",
"test",
"class",
"body",
"=",
"null",
";",
"completable",
"future",
"<",
"void",
">",
"response",
"=",
"api",
"test",
"body",
"with",
"file",
"schema",
"(",
"body",
")",
";",
"/",
"/",
"todo",
":",
"test",
"validations",
"}"
] |
[
"returns",
"true",
"if",
"there",
"are",
"values",
"to",
"highlight",
",",
"false",
"if",
"there",
"are",
"no",
"values",
"to",
"highlight",
"checks",
"if",
"the",
"highlight",
"array",
"is",
"null",
",",
"has",
"a",
"length",
"of",
"zero",
"or",
"if",
"the",
"first",
"object",
"is",
"null"
] |
[
"public",
"boolean",
"values",
"to",
"highlight",
"(",
")",
"{",
"return",
"m",
"indices",
"to",
"highlight",
"=",
"=",
"null",
"|",
"|",
"m",
"indices",
"to",
"highlight",
"length",
"<",
"=",
"0",
"|",
"|",
"m",
"indices",
"to",
"highlight",
"[",
"0",
"]",
"=",
"=",
"null",
"?",
"false",
":",
"true",
";",
"}"
] |
[
"should",
"be",
"able",
"to",
"unsubscribe",
"all",
"subscribers",
",",
"have",
"it",
"stop",
"emitting",
",",
"then",
"subscribe",
"new",
"ones",
"and",
"it",
"start",
"emitting",
"again"
] |
[
"public",
"void",
"re",
"subscribe",
"(",
")",
"{",
"final",
"publish",
"processor",
"<",
"integer",
">",
"pp",
"=",
"publish",
"processor",
"create",
"(",
")",
";",
"subscriber",
"<",
"integer",
">",
"subscriber",
"1",
"=",
"test",
"helper",
"mock",
"subscriber",
"(",
")",
";",
"test",
"subscriber",
"<",
"integer",
">",
"ts",
"=",
"new",
"test",
"subscriber",
"<",
">",
"(",
"subscriber",
"1",
")",
";",
"pp",
"subscribe",
"(",
"ts",
")",
";",
"/",
"/",
"emit",
"pp",
"on",
"next",
"(",
"1",
")",
";",
"/",
"/",
"validate",
"we",
"got",
"it",
"in",
"order",
"in",
"order",
"1",
"=",
"in",
"order",
"(",
"subscriber",
"1",
")",
";",
"in",
"order",
"1",
"verify",
"(",
"subscriber",
"1",
",",
"times",
"(",
"1",
")",
")",
"on",
"next",
"(",
"1",
")",
";",
"in",
"order",
"1",
"verify",
"no",
"more",
"interactions",
"(",
")",
";",
"/",
"/",
"unsubscribe",
"ts",
"cancel",
"(",
")",
";",
"/",
"/",
"emit",
"again",
"but",
"nothing",
"will",
"be",
"there",
"to",
"receive",
"it",
"pp",
"on",
"next",
"(",
"2",
")",
";",
"subscriber",
"<",
"integer",
">",
"subscriber",
"2",
"=",
"test",
"helper",
"mock",
"subscriber",
"(",
")",
";",
"test",
"subscriber",
"<",
"integer",
">",
"ts",
"2",
"=",
"new",
"test",
"subscriber",
"<",
">",
"(",
"subscriber",
"2",
")",
";",
"pp",
"subscribe",
"(",
"ts",
"2",
")",
";",
"/",
"/",
"emit",
"pp",
"on",
"next",
"(",
"3",
")",
";",
"/",
"/",
"validate",
"we",
"got",
"it",
"in",
"order",
"in",
"order",
"2",
"=",
"in",
"order",
"(",
"subscriber",
"2",
")",
";",
"in",
"order",
"2",
"verify",
"(",
"subscriber",
"2",
",",
"times",
"(",
"1",
")",
")",
"on",
"next",
"(",
"3",
")",
";",
"in",
"order",
"2",
"verify",
"no",
"more",
"interactions",
"(",
")",
";",
"ts",
"2",
"cancel",
"(",
")",
";",
"}"
] |
[
"get",
"snake",
"case"
] |
[
"public",
"integer",
"get",
"snake",
"case",
"(",
")",
"{",
"return",
"snake",
"case",
";",
"}"
] |
[
"get",
"the",
"matching",
"condition",
"for",
"the",
"held",
"request",
"condition",
"wrap",
"it",
"in",
"a",
"new",
"request",
"condition",
"holder",
"instance",
"or",
"otherwise",
"if",
"this",
"is",
"an",
"empty",
"holder",
",",
"return",
"the",
"same",
"holder",
"instance"
] |
[
"public",
"request",
"condition",
"holder",
"get",
"matching",
"condition",
"(",
"server",
"web",
"exchange",
"exchange",
")",
"{",
"if",
"(",
"this",
"condition",
"=",
"=",
"null",
")",
"{",
"return",
"this",
";",
"}",
"request",
"condition",
"<",
"?",
">",
"match",
"=",
"(",
"request",
"condition",
"<",
"?",
">",
")",
"this",
"condition",
"get",
"matching",
"condition",
"(",
"exchange",
")",
";",
"return",
"(",
"match",
"!",
"=",
"null",
"?",
"new",
"request",
"condition",
"holder",
"(",
"match",
")",
":",
"null",
")",
";",
"}"
] |
[
"returns",
"true",
"if",
"there",
"is",
"one",
"or",
"markup",
"items",
"that",
"have",
"been",
"marked",
"as",
"\"",
"don",
"'",
"t",
"care",
"\""
] |
[
"public",
"boolean",
"has",
"dont",
"care",
"markup",
"(",
")",
"{",
"return",
"(",
"status",
"&",
"has",
"dont",
"care",
")",
"!",
"=",
"0",
";",
"}"
] |
[
"this",
"method",
"retrieves",
"the",
"current",
"scheduler",
"status",
",",
"and",
"it",
"is",
"reachable",
"by",
"using",
"{",
"@",
"link",
"r",
"m",
"w",
"s",
"consts",
"#",
"scheduler",
"}"
] |
[
"scheduler",
"type",
"info",
"get",
"scheduler",
"info",
"(",
")",
";"
] |
[
"get",
"the",
"federated",
"test",
"file",
"for",
"a",
"nameservice"
] |
[
"public",
"string",
"get",
"federated",
"test",
"file",
"for",
"n",
"s",
"(",
"string",
"ns",
"id",
")",
"{",
"return",
"get",
"federated",
"path",
"for",
"n",
"s",
"(",
"ns",
"id",
")",
"+",
"\"",
"/",
"\"",
"+",
"test",
"file",
";",
"}"
] |
[
"returns",
"the",
"boot",
"log",
"of",
"the",
"python",
"environment"
] |
[
"string",
"get",
"boot",
"log",
"(",
")",
"throws",
"exception",
";"
] |
[
"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",
"formatted",
",",
"comma",
"-",
"separated",
"list",
"of",
"the",
"user",
"i",
"ds",
"held",
"in",
"{",
"@",
"code",
"auth",
"info",
"}",
",",
"or",
"{",
"@",
"code",
"null",
"}",
"if",
"no",
"user",
"i",
"ds",
"were",
"found",
"note",
"that",
"while",
"the",
"result",
"may",
"be",
"easy",
"on",
"the",
"eyes",
",",
"it",
"is",
"underspecified",
":",
"it",
"does",
"not",
"mention",
"the",
"corresponding",
"{",
"@",
"code",
"scheme",
"}",
",",
"nor",
"are",
"its",
"components",
"escaped",
"it",
"is",
"intended",
"for",
"for",
"logging",
",",
"and",
"is",
"not",
"a",
"security",
"feature"
] |
[
"public",
"static",
"string",
"get",
"users",
"(",
"list",
"<",
"id",
">",
"auth",
"info",
")",
"{",
"if",
"(",
"auth",
"info",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"string",
"formatted",
"=",
"auth",
"info",
"stream",
"(",
")",
"map",
"(",
"auth",
"util",
":",
":",
"get",
"user",
")",
"filter",
"(",
"name",
"-",
">",
"name",
"!",
"=",
"null",
"&",
"&",
"!",
"name",
"trim",
"(",
")",
"is",
"empty",
"(",
")",
")",
"collect",
"(",
"collectors",
"joining",
"(",
"\"",
",",
"\"",
")",
")",
";",
"return",
"formatted",
"is",
"empty",
"(",
")",
"?",
"null",
":",
"formatted",
";",
"}"
] |
[
"get",
"the",
"index",
"of",
"the",
"object",
"having",
"the",
"specified",
"name",
",",
"or",
"-",
"1",
"if",
"no",
"such",
"object",
"exists"
] |
[
"public",
"int",
"get",
"index",
"(",
"string",
"name",
")",
"{",
"return",
"get",
"index",
"(",
"get",
"(",
"name",
")",
")",
";",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.