docstring_tokens
list | code_tokens
list |
---|---|
[
"load",
"the",
"specified",
"schema",
"mappings",
"lazily"
] | [
"private",
"map",
"<",
"string",
",",
"string",
">",
"get",
"schema",
"mappings",
"(",
")",
"{",
"map",
"<",
"string",
",",
"string",
">",
"schema",
"mappings",
"=",
"this",
"schema",
"mappings",
";",
"if",
"(",
"schema",
"mappings",
"=",
"=",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"schema",
"mappings",
"=",
"this",
"schema",
"mappings",
";",
"if",
"(",
"schema",
"mappings",
"=",
"=",
"null",
")",
"{",
"if",
"(",
"logger",
"is",
"trace",
"enabled",
"(",
")",
")",
"{",
"logger",
"trace",
"(",
"\"",
"loading",
"schema",
"mappings",
"from",
"[",
"\"",
"+",
"this",
"schema",
"mappings",
"location",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"try",
"{",
"properties",
"mappings",
"=",
"properties",
"loader",
"utils",
"load",
"all",
"properties",
"(",
"this",
"schema",
"mappings",
"location",
",",
"this",
"class",
"loader",
")",
";",
"if",
"(",
"logger",
"is",
"trace",
"enabled",
"(",
")",
")",
"{",
"logger",
"trace",
"(",
"\"",
"loaded",
"schema",
"mappings",
":",
"\"",
"+",
"mappings",
")",
";",
"}",
"schema",
"mappings",
"=",
"new",
"concurrent",
"hash",
"map",
"<",
">",
"(",
"mappings",
"size",
"(",
")",
")",
";",
"collection",
"utils",
"merge",
"properties",
"into",
"map",
"(",
"mappings",
",",
"schema",
"mappings",
")",
";",
"this",
"schema",
"mappings",
"=",
"schema",
"mappings",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ex",
")",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"unable",
"to",
"load",
"schema",
"mappings",
"from",
"location",
"[",
"\"",
"+",
"this",
"schema",
"mappings",
"location",
"+",
"\"",
"]",
"\"",
",",
"ex",
")",
";",
"}",
"}",
"}",
"}",
"return",
"schema",
"mappings",
";",
"}"
] |
[
"set",
"the",
"name",
"of",
"the",
"default",
"initializer",
"method",
"note",
"that",
"this",
"method",
"is",
"not",
"enforced",
"on",
"all",
"affected",
"bean",
"definitions",
"but",
"rather",
"taken",
"as",
"an",
"optional",
"callback",
",",
"to",
"be",
"invoked",
"if",
"actually",
"present"
] | [
"public",
"void",
"set",
"init",
"method",
"name",
"(",
"@",
"nullable",
"string",
"init",
"method",
"name",
")",
"{",
"this",
"init",
"method",
"name",
"=",
"(",
"string",
"utils",
"has",
"text",
"(",
"init",
"method",
"name",
")",
"?",
"init",
"method",
"name",
":",
"null",
")",
";",
"}"
] |
[
"compile",
"a",
"source",
"directory",
"to",
"an",
"exploded",
"bundle"
] | [
"private",
"string",
"compile",
"to",
"exploded",
"bundle",
"(",
"print",
"writer",
"writer",
")",
"throws",
"i",
"o",
"exception",
",",
"o",
"s",
"gi",
"exception",
"{",
"compile",
"attempted",
"(",
")",
";",
"files",
"create",
"directories",
"(",
"binary",
"dir",
")",
";",
"summary",
"summary",
"=",
"new",
"summary",
"(",
")",
";",
"list",
"<",
"string",
">",
"options",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"options",
"add",
"(",
"\"",
"-",
"g",
"\"",
")",
";",
"options",
"add",
"(",
"\"",
"-",
"d",
"\"",
")",
";",
"options",
"add",
"(",
"binary",
"dir",
"to",
"string",
"(",
")",
")",
";",
"options",
"add",
"(",
"\"",
"-",
"sourcepath",
"\"",
")",
";",
"options",
"add",
"(",
"get",
"source",
"directory",
"(",
")",
"to",
"string",
"(",
")",
")",
";",
"options",
"add",
"(",
"\"",
"-",
"classpath",
"\"",
")",
";",
"options",
"add",
"(",
"system",
"get",
"property",
"(",
"\"",
"java",
"class",
"path",
"\"",
")",
"+",
"file",
"path",
"separator",
"+",
"binary",
"dir",
"to",
"string",
"(",
")",
")",
";",
"options",
"add",
"(",
"\"",
"-",
"proc",
":",
"none",
"\"",
")",
";",
"/",
"/",
"clear",
"build",
"errors",
"for",
"(",
"resource",
"file",
"source",
"file",
":",
"new",
"sources",
")",
"{",
"clear",
"build",
"errors",
"(",
"source",
"file",
")",
";",
"}",
"try",
"(",
"bundle",
"java",
"manager",
"bundle",
"java",
"manager",
"=",
"create",
"bundle",
"java",
"manager",
"(",
"writer",
",",
"summary",
",",
"options",
")",
")",
"{",
"final",
"list",
"<",
"resource",
"file",
"java",
"file",
"object",
">",
"source",
"files",
"=",
"new",
"sources",
"stream",
"(",
")",
"map",
"(",
"sf",
"-",
">",
"new",
"resource",
"file",
"java",
"file",
"object",
"(",
"sf",
"get",
"parent",
"file",
"(",
")",
",",
"sf",
",",
"kind",
"source",
")",
")",
"collect",
"(",
"collectors",
"to",
"list",
"(",
")",
")",
";",
"path",
"binary",
"manifest",
"=",
"get",
"binary",
"manifest",
"path",
"(",
")",
";",
"if",
"(",
"files",
"exists",
"(",
"binary",
"manifest",
")",
")",
"{",
"files",
"delete",
"(",
"binary",
"manifest",
")",
";",
"}",
"/",
"/",
"try",
"to",
"compile",
",",
"if",
"we",
"fail",
",",
"avoid",
"offenders",
"and",
"try",
"again",
"while",
"(",
"!",
"source",
"files",
"is",
"empty",
"(",
")",
")",
"{",
"if",
"(",
"try",
"build",
"(",
"writer",
",",
"bundle",
"java",
"manager",
",",
"source",
"files",
",",
"options",
")",
")",
"{",
"break",
";",
"}",
"}",
"/",
"/",
"build",
"errors",
"is",
"now",
"up",
"to",
"date",
",",
"set",
"status",
"if",
"(",
"get",
"build",
"error",
"count",
"(",
")",
">",
"0",
")",
"{",
"int",
"count",
"=",
"get",
"build",
"error",
"count",
"(",
")",
";",
"summary",
"printf",
"(",
"\"",
"%",
"d",
"source",
"file",
"%",
"s",
"with",
"errors",
"\"",
",",
"count",
",",
"count",
">",
"1",
"?",
"\"",
"s",
"\"",
":",
"\"",
"\"",
")",
";",
"}",
"resource",
"file",
"source",
"manifest",
"=",
"get",
"source",
"manifest",
"file",
"(",
")",
";",
"if",
"(",
"source",
"manifest",
"exists",
"(",
")",
")",
"{",
"files",
"create",
"directories",
"(",
"binary",
"manifest",
"get",
"parent",
"(",
")",
")",
";",
"try",
"(",
"input",
"stream",
"in",
"stream",
"=",
"source",
"manifest",
"get",
"input",
"stream",
"(",
")",
")",
"{",
"files",
"copy",
"(",
"in",
"stream",
",",
"binary",
"manifest",
",",
"standard",
"copy",
"option",
"replace",
"existing",
")",
";",
"}",
"return",
"summary",
"get",
"value",
"(",
")",
";",
"}",
"return",
"generate",
"manifest",
"(",
"writer",
",",
"summary",
",",
"binary",
"manifest",
")",
";",
"}",
"}"
] |
[
"read",
"the",
"next",
"keyvalue",
"pair",
"in",
"the",
"map",
"into",
"<",
"code",
">",
"key",
"<",
"code",
">",
"and",
"<",
"code",
">",
"val",
"<",
"code",
">",
"returns",
"true",
"if",
"such",
"a",
"pair",
"exists",
"and",
"false",
"when",
"at",
"the",
"end",
"of",
"the",
"map"
] | [
"public",
"synchronized",
"boolean",
"next",
"(",
"writable",
"comparable",
"key",
",",
"writable",
"val",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"data",
"next",
"(",
"key",
",",
"val",
")",
";",
"}"
] |
[
"restores",
"new",
"snapshot"
] | [
"public",
"static",
"restore",
"snapshot",
"request",
"restore",
"snapshot",
"request",
"(",
"string",
"repository",
",",
"string",
"snapshot",
")",
"{",
"return",
"new",
"restore",
"snapshot",
"request",
"(",
"repository",
",",
"snapshot",
")",
";",
"}"
] |
[
"patch",
"another",
"-",
"fakedummy"
] | [
"public",
"client",
"execute",
"as",
"(",
"function",
"<",
"response",
",",
"response",
">",
"handler",
")",
"{",
"type",
"type",
"=",
"new",
"type",
"token",
"<",
"client",
">",
"(",
")",
"{",
"}",
"get",
"type",
"(",
")",
";",
"return",
"execute",
"(",
"handler",
")",
"as",
"(",
"type",
")",
";",
"}"
] |
[
"an",
"optional",
"list",
"of",
"hex",
"-",
"encoded",
"sha",
"-",
"256",
"hashes",
"of",
"the",
"authorized",
"client",
"certificates",
"both",
"simple",
"and",
"colon",
"separated",
"formats",
"are",
"acceptable",
"note",
":",
"when",
"both",
"verify",
"certificate",
"hash",
"and",
"verify",
"certificate",
"spki",
"are",
"specified",
",",
"a",
"hash",
"matching",
"either",
"value",
"will",
"result",
"in",
"the",
"certificate",
"being",
"accepted",
"<",
"code",
">",
"repeated",
"string",
"verify",
"certificate",
"hash",
"=",
"12",
";",
"<",
"code",
">"
] | [
"public",
"com",
"google",
"protobuf",
"byte",
"string",
"get",
"verify",
"certificate",
"hash",
"bytes",
"(",
"int",
"index",
")",
"{",
"return",
"verify",
"certificate",
"hash",
"get",
"byte",
"string",
"(",
"index",
")",
";",
"}"
] |
[
"for",
"unit",
"test",
"purposes",
",",
"suppresses",
"auto",
"-",
"update",
"of",
"the",
"metrics",
"from",
"the",
"dedicated",
"thread"
] | [
"public",
"void",
"suppress",
"auto",
"update",
"(",
")",
"{",
"suppress",
"auto",
"update",
"=",
"true",
";",
"}"
] |
[
"create",
"an",
"empty",
"block",
"token",
"identifier"
] | [
"public",
"block",
"token",
"identifier",
"create",
"identifier",
"(",
")",
"{",
"return",
"new",
"block",
"token",
"identifier",
"(",
")",
";",
"}"
] |
[
"create",
"an",
"{",
"@",
"link",
"aop",
"proxy",
"}",
"for",
"the",
"given",
"aop",
"configuration"
] | [
"aop",
"proxy",
"create",
"aop",
"proxy",
"(",
"advised",
"support",
"config",
")",
"throws",
"aop",
"config",
"exception",
";"
] |
[
"returns",
"the",
"current",
"maximum",
"allowed",
"date"
] | [
"public",
"local",
"date",
"get",
"max",
"date",
"(",
")",
"{",
"return",
"max",
"date",
";",
"}"
] |
[
"output",
"an",
"indented",
"representation",
"of",
"the",
"expression",
"syntax",
"tree",
"to",
"the",
"specified",
"output",
"stream"
] | [
"public",
"static",
"void",
"print",
"abstract",
"syntax",
"tree",
"(",
"print",
"stream",
"print",
"stream",
",",
"expression",
"expression",
")",
"{",
"print",
"stream",
"println",
"(",
"\"",
"=",
"=",
"=",
">",
"expression",
"'",
"\"",
"+",
"expression",
"get",
"expression",
"string",
"(",
")",
"+",
"\"",
"'",
"-",
"ast",
"start",
"\"",
")",
";",
"print",
"a",
"s",
"t",
"(",
"print",
"stream",
",",
"(",
"(",
"spel",
"expression",
")",
"expression",
")",
"get",
"a",
"s",
"t",
"(",
")",
",",
"\"",
"\"",
")",
";",
"print",
"stream",
"println",
"(",
"\"",
"=",
"=",
"=",
">",
"expression",
"'",
"\"",
"+",
"expression",
"get",
"expression",
"string",
"(",
")",
"+",
"\"",
"'",
"-",
"ast",
"end",
"\"",
")",
";",
"}"
] |
[
"returns",
"whether",
"some",
"other",
"object",
"is",
"\"",
"equal",
"to",
"\"",
"this",
"one"
] | [
"public",
"boolean",
"equals",
"(",
"object",
"obj",
")",
"{",
"if",
"(",
"obj",
"=",
"=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"obj",
"=",
"=",
"this",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"obj",
"get",
"class",
"(",
")",
"!",
"=",
"pseudo",
"data",
"component",
"class",
")",
"{",
"return",
"false",
";",
"}",
"pseudo",
"data",
"component",
"data",
"=",
"(",
"pseudo",
"data",
"component",
")",
"obj",
";",
"if",
"(",
"(",
"index",
"in",
"parent",
"!",
"=",
"data",
"index",
"in",
"parent",
")",
"|",
"|",
"(",
"offset",
"!",
"=",
"data",
"offset",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"super",
"equals",
"(",
"obj",
")",
";",
"}"
] |
[
"test",
"if",
"the",
"given",
"properties",
"match"
] | [
"match",
"status",
"matches",
"(",
"properties",
"properties",
")",
";"
] |
[
"creates",
"the",
"executor",
"service",
"used",
"to",
"run",
"map",
"tasks"
] | [
"protected",
"synchronized",
"executor",
"service",
"create",
"map",
"executor",
"(",
")",
"{",
"/",
"/",
"determine",
"the",
"size",
"of",
"the",
"thread",
"pool",
"to",
"use",
"int",
"max",
"map",
"threads",
"=",
"job",
"get",
"int",
"(",
"local",
"max",
"maps",
",",
"1",
")",
";",
"if",
"(",
"max",
"map",
"threads",
"<",
"1",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"configured",
"\"",
"+",
"local",
"max",
"maps",
"+",
"\"",
"must",
"be",
">",
"=",
"1",
"\"",
")",
";",
"}",
"max",
"map",
"threads",
"=",
"math",
"min",
"(",
"max",
"map",
"threads",
",",
"this",
"num",
"map",
"tasks",
")",
";",
"max",
"map",
"threads",
"=",
"math",
"max",
"(",
"max",
"map",
"threads",
",",
"1",
")",
";",
"/",
"/",
"in",
"case",
"of",
"no",
"tasks",
"log",
"debug",
"(",
"\"",
"starting",
"mapper",
"thread",
"pool",
"executor",
"\"",
")",
";",
"log",
"debug",
"(",
"\"",
"max",
"local",
"threads",
":",
"\"",
"+",
"max",
"map",
"threads",
")",
";",
"log",
"debug",
"(",
"\"",
"map",
"tasks",
"to",
"process",
":",
"\"",
"+",
"this",
"num",
"map",
"tasks",
")",
";",
"/",
"/",
"create",
"a",
"new",
"executor",
"service",
"to",
"drain",
"the",
"work",
"queue",
"thread",
"factory",
"tf",
"=",
"new",
"thread",
"factory",
"builder",
"(",
")",
"set",
"name",
"format",
"(",
"\"",
"local",
"job",
"runner",
"map",
"task",
"executor",
"#",
"%",
"d",
"\"",
")",
"build",
"(",
")",
";",
"executor",
"service",
"executor",
"=",
"hadoop",
"executors",
"new",
"fixed",
"thread",
"pool",
"(",
"max",
"map",
"threads",
",",
"tf",
")",
";",
"return",
"executor",
";",
"}"
] |
[
"returns",
"a",
"collection",
"of",
"module",
"library",
"directories",
"library",
"directories",
"are",
"optional",
"for",
"a",
"module"
] | [
"public",
"static",
"collection",
"<",
"resource",
"file",
">",
"get",
"library",
"directories",
"(",
")",
"{",
"check",
"app",
"initialized",
"(",
")",
";",
"return",
"module",
"utilities",
"get",
"module",
"lib",
"directories",
"(",
"app",
"layout",
"get",
"modules",
"(",
")",
")",
";",
"}"
] |
[
"set",
"the",
"render",
"function",
"name",
"(",
"optional",
")",
"if",
"not",
"specified",
",",
"the",
"script",
"templates",
"will",
"be",
"evaluated",
"with",
"{",
"@",
"link",
"script",
"engine",
"#",
"eval",
"(",
"string",
",",
"bindings",
")",
"}",
"this",
"function",
"will",
"be",
"called",
"with",
"the",
"following",
"parameters",
":",
"{",
"@",
"code",
"string",
"template",
"}",
":",
"the",
"template",
"content",
"{",
"@",
"code",
"map",
"model",
"}",
":",
"the",
"view",
"model",
"{",
"@",
"code",
"rendering",
"context",
"context",
"}",
":",
"the",
"rendering",
"context",
"(",
"since",
"5",
"0",
")"
] | [
"public",
"void",
"set",
"render",
"function",
"(",
"@",
"nullable",
"string",
"render",
"function",
")",
"{",
"this",
"render",
"function",
"=",
"render",
"function",
";",
"}"
] |
[
"helper",
"method",
"to",
"create",
"a",
"upstream",
"message",
"when",
"the",
"incoming",
"parsing",
"did",
"fail"
] | [
"protected",
"abstract",
"m",
"build",
"invalid",
"message",
"(",
")",
";"
] |
[
"an",
"endpoint",
"for",
"a",
"user",
"to",
"retrieve",
"an",
"image",
"path"
] | [
"public",
"string",
"get",
"image",
"path",
"(",
")",
"{",
"logger",
"info",
"(",
"\"",
"successfully",
"found",
"image",
"path",
"\"",
")",
";",
"return",
"\"",
"/",
"product",
"-",
"image",
"png",
"\"",
";",
"}"
] |
[
"create",
"two",
"snapshots",
"in",
"each",
"iteration",
"each",
"time",
"we",
"will",
"create",
"a",
"snapshot",
"for",
"the",
"top",
"node",
",",
"then",
"randomly",
"pick",
"a",
"dir",
"in",
"the",
"tree",
"and",
"create",
"snapshot",
"for",
"it",
"finally",
"check",
"the",
"snapshots",
"are",
"created",
"correctly"
] | [
"protected",
"test",
"directory",
"tree",
"node",
"[",
"]",
"create",
"snapshots",
"(",
")",
"throws",
"exception",
"{",
"test",
"directory",
"tree",
"node",
"[",
"]",
"nodes",
"=",
"new",
"test",
"directory",
"tree",
"node",
"[",
"2",
"]",
";",
"/",
"/",
"each",
"time",
"we",
"will",
"create",
"a",
"snapshot",
"for",
"the",
"top",
"level",
"dir",
"path",
"root",
"=",
"snapshot",
"test",
"helper",
"create",
"snapshot",
"(",
"hdfs",
",",
"dir",
"tree",
"top",
"node",
"node",
"path",
",",
"next",
"snapshot",
"name",
"(",
")",
")",
";",
"snapshot",
"list",
"add",
"(",
"root",
")",
";",
"nodes",
"[",
"0",
"]",
"=",
"dir",
"tree",
"top",
"node",
";",
"snapshot",
"test",
"helper",
"check",
"snapshot",
"creation",
"(",
"hdfs",
",",
"root",
",",
"nodes",
"[",
"0",
"]",
"node",
"path",
")",
";",
"/",
"/",
"then",
"randomly",
"pick",
"one",
"dir",
"from",
"the",
"tree",
"(",
"cannot",
"be",
"the",
"top",
"node",
")",
"and",
"/",
"/",
"create",
"snapshot",
"for",
"it",
"array",
"list",
"<",
"test",
"directory",
"tree",
"node",
">",
"excluded",
"list",
"=",
"new",
"array",
"list",
"<",
"test",
"directory",
"tree",
"node",
">",
"(",
")",
";",
"excluded",
"list",
"add",
"(",
"nodes",
"[",
"0",
"]",
")",
";",
"nodes",
"[",
"1",
"]",
"=",
"dir",
"tree",
"get",
"random",
"dir",
"node",
"(",
"random",
",",
"excluded",
"list",
")",
";",
"root",
"=",
"snapshot",
"test",
"helper",
"create",
"snapshot",
"(",
"hdfs",
",",
"nodes",
"[",
"1",
"]",
"node",
"path",
",",
"next",
"snapshot",
"name",
"(",
")",
")",
";",
"snapshot",
"list",
"add",
"(",
"root",
")",
";",
"snapshot",
"test",
"helper",
"check",
"snapshot",
"creation",
"(",
"hdfs",
",",
"root",
",",
"nodes",
"[",
"1",
"]",
"node",
"path",
")",
";",
"return",
"nodes",
";",
"}"
] |
[
"store",
"a",
"batch",
"of",
"serialized",
"edits",
"into",
"this",
"cache",
"removes",
"old",
"batches",
"as",
"necessary",
"to",
"keep",
"the",
"total",
"size",
"of",
"the",
"cache",
"below",
"the",
"capacity",
"see",
"the",
"class",
"javadoc",
"for",
"more",
"info",
"this",
"attempts",
"to",
"always",
"handle",
"malformed",
"inputs",
"gracefully",
"rather",
"than",
"throwing",
"an",
"exception",
",",
"to",
"allow",
"the",
"rest",
"of",
"the",
"journal",
"'",
"s",
"operations",
"to",
"proceed",
"normally"
] | [
"void",
"store",
"edits",
"(",
"byte",
"[",
"]",
"input",
"data",
",",
"long",
"new",
"start",
"txn",
",",
"long",
"new",
"end",
"txn",
",",
"int",
"new",
"layout",
"version",
")",
"{",
"if",
"(",
"new",
"start",
"txn",
"<",
"0",
"|",
"|",
"new",
"end",
"txn",
"<",
"new",
"start",
"txn",
")",
"{",
"journal",
"log",
"error",
"(",
"string",
"format",
"(",
"\"",
"attempted",
"to",
"cache",
"data",
"of",
"length",
"%",
"d",
"\"",
"+",
"\"",
"with",
"new",
"start",
"txn",
"%",
"d",
"and",
"new",
"end",
"txn",
"%",
"d",
"\"",
",",
"input",
"data",
"length",
",",
"new",
"start",
"txn",
",",
"new",
"end",
"txn",
")",
")",
";",
"return",
";",
"}",
"try",
"(",
"auto",
"closeable",
"lock",
"l",
"=",
"write",
"lock",
"acquire",
"(",
")",
")",
"{",
"if",
"(",
"new",
"layout",
"version",
"!",
"=",
"layout",
"version",
")",
"{",
"try",
"{",
"update",
"layout",
"version",
"(",
"new",
"layout",
"version",
",",
"new",
"start",
"txn",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ioe",
")",
"{",
"journal",
"log",
"error",
"(",
"string",
"format",
"(",
"\"",
"unable",
"to",
"save",
"new",
"edits",
"[",
"%",
"d",
",",
"%",
"d",
"]",
"\"",
"+",
"\"",
"due",
"to",
"exception",
"when",
"updating",
"to",
"new",
"layout",
"version",
"%",
"d",
"\"",
",",
"new",
"start",
"txn",
",",
"new",
"end",
"txn",
",",
"new",
"layout",
"version",
")",
",",
"ioe",
")",
";",
"return",
";",
"}",
"}",
"else",
"if",
"(",
"lowest",
"txn",
"id",
"=",
"=",
"invalid",
"txn",
"id",
")",
"{",
"journal",
"log",
"info",
"(",
"\"",
"initializing",
"edits",
"cache",
"starting",
"from",
"txn",
"id",
"\"",
"+",
"new",
"start",
"txn",
")",
";",
"initialize",
"(",
"new",
"start",
"txn",
")",
";",
"}",
"else",
"if",
"(",
"highest",
"txn",
"id",
"+",
"1",
"!",
"=",
"new",
"start",
"txn",
")",
"{",
"/",
"/",
"cache",
"is",
"out",
"of",
"sync",
";",
"clear",
"to",
"avoid",
"storing",
"noncontiguous",
"regions",
"journal",
"log",
"error",
"(",
"string",
"format",
"(",
"\"",
"edits",
"cache",
"is",
"out",
"of",
"sync",
";",
"\"",
"+",
"\"",
"looked",
"for",
"next",
"txn",
"id",
"at",
"%",
"d",
"but",
"got",
"start",
"txn",
"id",
"for",
"\"",
"+",
"\"",
"cache",
"put",
"request",
"at",
"%",
"d",
"reinitializing",
"at",
"new",
"request",
"\"",
",",
"highest",
"txn",
"id",
"+",
"1",
",",
"new",
"start",
"txn",
")",
")",
";",
"initialize",
"(",
"new",
"start",
"txn",
")",
";",
"}",
"while",
"(",
"(",
"total",
"size",
"+",
"input",
"data",
"length",
")",
">",
"capacity",
"&",
"&",
"!",
"data",
"map",
"is",
"empty",
"(",
")",
")",
"{",
"map",
"entry",
"<",
"long",
",",
"byte",
"[",
"]",
">",
"lowest",
"=",
"data",
"map",
"first",
"entry",
"(",
")",
";",
"data",
"map",
"remove",
"(",
"lowest",
"get",
"key",
"(",
")",
")",
";",
"total",
"size",
"-",
"=",
"lowest",
"get",
"value",
"(",
")",
"length",
";",
"}",
"if",
"(",
"input",
"data",
"length",
">",
"capacity",
")",
"{",
"initialize",
"(",
"invalid",
"txn",
"id",
")",
";",
"journal",
"log",
"warn",
"(",
"string",
"format",
"(",
"\"",
"a",
"single",
"batch",
"of",
"edits",
"was",
"too",
"\"",
"+",
"\"",
"large",
"to",
"fit",
"into",
"the",
"cache",
":",
"start",
"txn",
"=",
"%",
"d",
",",
"end",
"txn",
"=",
"%",
"d",
",",
"\"",
"+",
"\"",
"input",
"length",
"=",
"%",
"d",
"the",
"capacity",
"of",
"the",
"cache",
"(",
"%",
"s",
")",
"must",
"be",
"\"",
"+",
"\"",
"increased",
"for",
"it",
"to",
"work",
"properly",
"(",
"current",
"capacity",
"%",
"d",
")",
"\"",
"+",
"\"",
"cache",
"is",
"now",
"empty",
"\"",
",",
"new",
"start",
"txn",
",",
"new",
"end",
"txn",
",",
"input",
"data",
"length",
",",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"journalnode",
"edit",
"cache",
"size",
"key",
",",
"capacity",
")",
")",
";",
"return",
";",
"}",
"if",
"(",
"data",
"map",
"is",
"empty",
"(",
")",
")",
"{",
"lowest",
"txn",
"id",
"=",
"new",
"start",
"txn",
";",
"}",
"else",
"{",
"lowest",
"txn",
"id",
"=",
"data",
"map",
"first",
"key",
"(",
")",
";",
"}",
"data",
"map",
"put",
"(",
"new",
"start",
"txn",
",",
"input",
"data",
")",
";",
"highest",
"txn",
"id",
"=",
"new",
"end",
"txn",
";",
"total",
"size",
"+",
"=",
"input",
"data",
"length",
";",
"}",
"}"
] |
[
"sets",
"the",
"configuration",
"for",
"this",
"extension"
] | [
"public",
"builder",
"set",
"configuration",
"(",
"build",
"configuration",
"build",
"configuration",
")",
"{",
"this",
"build",
"configuration",
"=",
"preconditions",
"check",
"not",
"null",
"(",
"build",
"configuration",
")",
";",
"return",
"this",
";",
"}"
] |
[
"if",
"this",
"is",
"a",
"text",
"template",
"not",
"using",
"mustache"
] | [
"static",
"void",
"validate",
"email",
"addresses",
"(",
"text",
"template",
"emails",
")",
"{",
"for",
"(",
"text",
"template",
"email",
"template",
":",
"emails",
")",
"{",
"/",
"/",
"no",
"mustache",
",",
"do",
"validation",
"if",
"(",
"email",
"template",
"may",
"require",
"compilation",
"(",
")",
"=",
"=",
"false",
")",
"{",
"string",
"email",
"=",
"email",
"template",
"get",
"template",
"(",
")",
";",
"try",
"{",
"for",
"(",
"email",
"address",
"address",
":",
"email",
"address",
"list",
"parse",
"(",
"email",
")",
")",
"{",
"address",
"validate",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"address",
"exception",
"e",
")",
"{",
"throw",
"new",
"elasticsearch",
"parse",
"exception",
"(",
"\"",
"invalid",
"email",
"address",
"[",
"{",
"}",
"]",
"\"",
",",
"e",
",",
"email",
")",
";",
"}",
"}",
"}",
"}"
] |
[
"get",
"double",
"minimum",
":",
"67",
"8",
"maximum",
":",
"123",
"4"
] | [
"public",
"double",
"get",
"double",
"(",
")",
"{",
"return",
"double",
";",
"}"
] |
[
"return",
"a",
"{",
"@",
"link",
"java",
"util",
"map",
"}",
"of",
"the",
"multipart",
"files",
"contained",
"in",
"this",
"request"
] | [
"map",
"<",
"string",
",",
"multipart",
"file",
">",
"get",
"file",
"map",
"(",
")",
";"
] |
[
"returns",
"the",
"mask",
"that",
"indicates",
"which",
"bits",
"in",
"the",
"base",
"register",
"apply",
"to",
"this",
"register"
] | [
"public",
"byte",
"[",
"]",
"get",
"base",
"mask",
"(",
")",
"{",
"if",
"(",
"base",
"mask",
"=",
"=",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"register",
"base",
"=",
"get",
"base",
"register",
"(",
")",
";",
"int",
"byte",
"length",
"=",
"(",
"base",
"get",
"bit",
"length",
"(",
")",
"+",
"7",
")",
"/",
"8",
";",
"byte",
"[",
"]",
"new",
"base",
"mask",
"=",
"new",
"byte",
"[",
"byte",
"length",
"]",
";",
"int",
"end",
"bit",
"=",
"least",
"sig",
"bit",
"in",
"base",
"register",
"+",
"bit",
"length",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"least",
"sig",
"bit",
"in",
"base",
"register",
";",
"i",
"<",
"=",
"end",
"bit",
";",
"i",
"+",
"+",
")",
"{",
"set",
"bit",
"(",
"new",
"base",
"mask",
",",
"i",
")",
";",
"}",
"base",
"mask",
"=",
"new",
"base",
"mask",
";",
"}",
"}",
"return",
"base",
"mask",
";",
"}"
] |
[
"create",
"a",
"new",
"{",
"@",
"link",
"channel",
"}",
"that",
"will",
"call",
"{",
"@",
"code",
"interceptors",
"}",
"before",
"starting",
"a",
"call",
"on",
"the",
"given",
"channel",
"the",
"first",
"interceptor",
"will",
"have",
"its",
"{",
"@",
"link",
"client",
"interceptor",
"#",
"intercept",
"call",
"}",
"called",
"first"
] | [
"public",
"static",
"channel",
"intercept",
"forward",
"(",
"channel",
"channel",
",",
"client",
"interceptor",
"interceptors",
")",
"{",
"return",
"intercept",
"forward",
"(",
"channel",
",",
"arrays",
"as",
"list",
"(",
"interceptors",
")",
")",
";",
"}"
] |
[
"tests",
"that",
"rest",
"server",
"ssl",
"engine",
"is",
"not",
"created",
"if",
"ssl",
"is",
"disabled"
] | [
"public",
"void",
"test",
"r",
"e",
"s",
"t",
"server",
"s",
"s",
"l",
"disabled",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"server",
"config",
"=",
"create",
"rest",
"ssl",
"config",
"with",
"key",
"store",
"(",
")",
";",
"server",
"config",
"set",
"boolean",
"(",
"security",
"options",
"ssl",
"rest",
"enabled",
",",
"false",
")",
";",
"try",
"{",
"s",
"s",
"l",
"utils",
"create",
"rest",
"server",
"s",
"s",
"l",
"engine",
"factory",
"(",
"server",
"config",
")",
";",
"fail",
"(",
"\"",
"exception",
"expected",
"\"",
")",
";",
"}",
"catch",
"(",
"illegal",
"configuration",
"exception",
"ignored",
")",
"{",
"}",
"}"
] |
[
"test",
"the",
"property",
"'",
"color",
"'"
] | [
"public",
"void",
"color",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"color",
"}"
] |
[
"@",
"inherit",
"doc"
] | [
"public",
"type",
"bearer",
"get",
"(",
"int",
"idx",
")",
"{",
"return",
"primary",
"get",
"(",
"idx",
")",
";",
"}"
] |
[
"convenience",
"method",
"to",
"get",
"this",
"element",
"as",
"a",
"string"
] | [
"public",
"string",
"get",
"as",
"string",
"(",
")",
"{",
"if",
"(",
"is",
"number",
"(",
")",
")",
"{",
"return",
"get",
"as",
"number",
"(",
")",
"to",
"string",
"(",
")",
";",
"}",
"else",
"if",
"(",
"is",
"boolean",
"(",
")",
")",
"{",
"return",
"(",
"(",
"boolean",
")",
"value",
")",
"to",
"string",
"(",
")",
";",
"}",
"else",
"{",
"return",
"(",
"string",
")",
"value",
";",
"}",
"}"
] |
[
"legacy",
"record",
"batch",
"does",
"not",
"implement",
"this",
"iterator",
"and",
"would",
"hence",
"fallback",
"to",
"the",
"normal",
"iterator"
] | [
"public",
"closeable",
"iterator",
"<",
"record",
">",
"skip",
"key",
"value",
"iterator",
"(",
"buffer",
"supplier",
"buffer",
"supplier",
")",
"{",
"return",
"closeable",
"iterator",
"wrap",
"(",
"iterator",
"(",
"buffer",
"supplier",
")",
")",
";",
"}"
] |
[
"register",
"a",
"listener",
"that",
"will",
"be",
"called",
"when",
"this",
"model",
"visibility",
"state",
"has",
"changed",
"the",
"listener",
"will",
"contribute",
"to",
"this",
"model",
"'",
"s",
"hash",
"code",
"state",
"per",
"the",
"{",
"@",
"link",
"com",
"airbnb",
"epoxy",
"epoxy",
"attribute",
"option",
"#",
"do",
"not",
"hash",
"}",
"rules"
] | [
"public",
"test",
"field",
"prop",
"ignore",
"require",
"hash",
"code",
"option",
"view",
"model",
"on",
"visibility",
"state",
"changed",
"(",
"on",
"model",
"visibility",
"state",
"changed",
"listener",
"<",
"test",
"field",
"prop",
"ignore",
"require",
"hash",
"code",
"option",
"view",
"model",
",",
"test",
"field",
"prop",
"ignore",
"require",
"hash",
"code",
"option",
"view",
">",
"listener",
")",
"{",
"on",
"mutation",
"(",
")",
";",
"this",
"on",
"model",
"visibility",
"state",
"changed",
"listener",
"epoxy",
"generated",
"model",
"=",
"listener",
";",
"return",
"this",
";",
"}"
] |
[
"returns",
"{",
"@",
"code",
"true",
"}",
"if",
"rewind",
"is",
"enabled",
",",
"{",
"@",
"code",
"false",
"}",
"otherwise"
] | [
"boolean",
"is",
"rewind",
"enabled",
"(",
")",
";"
] |
[
"returns",
"the",
"underlying",
"memory",
"segment",
"this",
"method",
"is",
"dangerous",
"since",
"it",
"ignores",
"read",
"only",
"protections",
"and",
"omits",
"slices",
"use",
"it",
"only",
"along",
"the",
"{",
"@",
"link",
"#",
"get",
"memory",
"segment",
"offset",
"(",
")",
"}",
"this",
"method",
"will",
"be",
"removed",
"in",
"the",
"future",
"for",
"writing",
"use",
"{",
"@",
"link",
"buffer",
"builder",
"}"
] | [
"memory",
"segment",
"get",
"memory",
"segment",
"(",
")",
";"
] |
[
"test",
"that",
"when",
"all",
"reports",
"are",
"expired",
",",
"we",
"get",
"back",
"nothing"
] | [
"public",
"void",
"test",
"all",
"reports",
"are",
"expired",
"(",
")",
"throws",
"exception",
"{",
"add",
"slow",
"disk",
"for",
"testing",
"(",
"\"",
"dn",
"1",
"\"",
",",
"\"",
"disk",
"1",
"\"",
",",
"immutable",
"map",
"of",
"(",
"disk",
"op",
"metadata",
",",
"1",
"1",
",",
"disk",
"op",
"read",
",",
"1",
"8",
")",
")",
";",
"add",
"slow",
"disk",
"for",
"testing",
"(",
"\"",
"dn",
"1",
"\"",
",",
"\"",
"disk",
"2",
"\"",
",",
"immutable",
"map",
"of",
"(",
"disk",
"op",
"read",
",",
"1",
"3",
")",
")",
";",
"add",
"slow",
"disk",
"for",
"testing",
"(",
"\"",
"dn",
"2",
"\"",
",",
"\"",
"disk",
"2",
"\"",
",",
"immutable",
"map",
"of",
"(",
"disk",
"op",
"write",
",",
"1",
"1",
")",
")",
";",
"/",
"/",
"no",
"reports",
"should",
"expire",
"after",
"1ms",
"timer",
"advance",
"(",
"1",
")",
";",
"tracker",
"update",
"slow",
"disk",
"report",
"async",
"(",
"timer",
"monotonic",
"now",
"(",
")",
")",
";",
"generic",
"test",
"utils",
"wait",
"for",
"(",
"new",
"supplier",
"<",
"boolean",
">",
"(",
")",
"{",
"@",
"override",
"public",
"boolean",
"get",
"(",
")",
"{",
"return",
"!",
"tracker",
"get",
"slow",
"disks",
"report",
"(",
")",
"is",
"empty",
"(",
")",
";",
"}",
"}",
",",
"500",
",",
"5000",
")",
";",
"map",
"<",
"string",
",",
"disk",
"latency",
">",
"reports",
"=",
"get",
"slow",
"disks",
"report",
"for",
"testing",
"(",
"tracker",
")",
";",
"assert",
"that",
"(",
"reports",
"size",
"(",
")",
",",
"is",
"(",
"3",
")",
")",
";",
"assert",
"true",
"(",
"math",
"abs",
"(",
"reports",
"get",
"(",
"\"",
"dn",
"1",
":",
"disk",
"1",
"\"",
")",
"get",
"latency",
"(",
"disk",
"op",
"metadata",
")",
"-",
"1",
"1",
")",
"<",
"0",
"0000001",
")",
";",
"assert",
"true",
"(",
"math",
"abs",
"(",
"reports",
"get",
"(",
"\"",
"dn",
"1",
":",
"disk",
"1",
"\"",
")",
"get",
"latency",
"(",
"disk",
"op",
"read",
")",
"-",
"1",
"8",
")",
"<",
"0",
"0000001",
")",
";",
"assert",
"true",
"(",
"math",
"abs",
"(",
"reports",
"get",
"(",
"\"",
"dn",
"1",
":",
"disk",
"2",
"\"",
")",
"get",
"latency",
"(",
"disk",
"op",
"read",
")",
"-",
"1",
"3",
")",
"<",
"0",
"0000001",
")",
";",
"assert",
"true",
"(",
"math",
"abs",
"(",
"reports",
"get",
"(",
"\"",
"dn",
"2",
":",
"disk",
"2",
"\"",
")",
"get",
"latency",
"(",
"disk",
"op",
"write",
")",
"-",
"1",
"1",
")",
"<",
"0",
"0000001",
")",
";",
"/",
"/",
"all",
"reports",
"should",
"expire",
"after",
"report",
"validity",
"ms",
"timer",
"advance",
"(",
"report",
"validity",
"ms",
")",
";",
"tracker",
"update",
"slow",
"disk",
"report",
"async",
"(",
"timer",
"monotonic",
"now",
"(",
")",
")",
";",
"generic",
"test",
"utils",
"wait",
"for",
"(",
"new",
"supplier",
"<",
"boolean",
">",
"(",
")",
"{",
"@",
"override",
"public",
"boolean",
"get",
"(",
")",
"{",
"return",
"tracker",
"get",
"slow",
"disks",
"report",
"(",
")",
"is",
"empty",
"(",
")",
";",
"}",
"}",
",",
"500",
",",
"3000",
")",
";",
"reports",
"=",
"get",
"slow",
"disks",
"report",
"for",
"testing",
"(",
"tracker",
")",
";",
"assert",
"that",
"(",
"reports",
"size",
"(",
")",
",",
"is",
"(",
"0",
")",
")",
";",
"}"
] |
[
"the",
"amount",
"of",
"buffer",
"time",
"before",
"expiration",
"to",
"maintain",
"when",
"refreshing",
"if",
"a",
"refresh",
"is",
"scheduled",
"to",
"occur",
"closer",
"to",
"expiration",
"than",
"the",
"number",
"of",
"seconds",
"defined",
"here",
"then",
"the",
"refresh",
"will",
"be",
"moved",
"up",
"to",
"maintain",
"as",
"much",
"of",
"the",
"desired",
"buffer",
"as",
"possible"
] | [
"public",
"short",
"login",
"refresh",
"buffer",
"seconds",
"(",
")",
"{",
"return",
"login",
"refresh",
"buffer",
"seconds",
";",
"}"
] |
[
"renders",
"this",
"label",
"in",
"canonical",
"form",
"invariant",
":",
"{",
"@",
"code",
"parse",
"absolute",
"(",
"x",
"to",
"string",
"(",
")",
",",
"false",
")",
"equals",
"(",
"x",
")",
"}"
] | [
"public",
"string",
"to",
"string",
"(",
")",
"{",
"return",
"get",
"canonical",
"form",
"(",
")",
";",
"}"
] |
[
"get",
"map",
"integer"
] | [
"public",
"map",
"<",
"string",
",",
"integer",
">",
"get",
"map",
"integer",
"(",
")",
"{",
"return",
"map",
"integer",
";",
"}"
] |
[
"verify",
"that",
"the",
"specified",
"current",
"user",
"has",
"admin",
"privilege",
"within",
"this",
"repository"
] | [
"public",
"user",
"validate",
"admin",
"privilege",
"(",
"string",
"current",
"user",
")",
"throws",
"user",
"access",
"exception",
"{",
"synchronized",
"(",
"file",
"system",
")",
"{",
"user",
"user",
"=",
"get",
"user",
"(",
"current",
"user",
")",
";",
"if",
"(",
"user",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"user",
"access",
"exception",
"(",
"\"",
"user",
"\"",
"+",
"current",
"user",
"+",
"\"",
"was",
"not",
"found",
"in",
"the",
"'",
"\"",
"+",
"name",
"+",
"\"",
"'",
"repository",
"access",
"list",
"\"",
")",
";",
"}",
"if",
"(",
"!",
"user",
"is",
"admin",
"(",
")",
")",
"{",
"throw",
"new",
"user",
"access",
"exception",
"(",
"\"",
"user",
"\"",
"+",
"current",
"user",
"+",
"\"",
"does",
"not",
"have",
"admin",
"privilege",
"\"",
")",
";",
"}",
"return",
"user",
";",
"}",
"}"
] |
[
"sets",
"the",
"format",
"to",
"use",
"for",
"the",
"output",
"of",
"the",
"aggregation"
] | [
"public",
"ab",
"format",
"(",
"string",
"format",
")",
"{",
"if",
"(",
"format",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"[",
"format",
"]",
"must",
"not",
"be",
"null",
":",
"[",
"\"",
"+",
"name",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"this",
"format",
"=",
"format",
";",
"return",
"(",
"ab",
")",
"this",
";",
"}"
] |
[
"set",
"the",
"next",
"key",
"to",
"have",
"the",
"given",
"partition"
] | [
"static",
"void",
"set",
"next",
"partition",
"(",
"int",
"new",
"value",
")",
"{",
"cache",
"set",
"(",
"new",
"value",
")",
";",
"}"
] |
[
"creates",
"a",
"java",
"finder",
"to",
"use",
"for",
"the",
"current",
"{",
"@",
"link",
"platform",
"platform",
"}"
] | [
"public",
"static",
"java",
"finder",
"create",
"(",
")",
"{",
"switch",
"(",
"get",
"current",
"platform",
"(",
")",
")",
"{",
"case",
"windows",
":",
"return",
"new",
"windows",
"java",
"finder",
"(",
")",
";",
"case",
"macos",
":",
"return",
"new",
"mac",
"java",
"finder",
"(",
")",
";",
"case",
"linux",
":",
"default",
":",
"return",
"new",
"linux",
"java",
"finder",
"(",
")",
";",
"}",
"}"
] |
[
"returns",
"a",
"windows",
"-",
"style",
"path",
"suitable",
"to",
"pass",
"to",
"unicode",
"win",
"a",
"p",
"i",
"functions"
] | [
"static",
"string",
"as",
"long",
"path",
"(",
"string",
"path",
")",
"{",
"return",
"!",
"path",
"starts",
"with",
"(",
"\"",
"\\",
"\\",
"\\",
"\\",
"?",
"\\",
"\\",
"\"",
")",
"?",
"(",
"\"",
"\\",
"\\",
"\\",
"\\",
"?",
"\\",
"\\",
"\"",
"+",
"path",
"replace",
"(",
"'",
"/",
"'",
",",
"'",
"\\",
"\\",
"'",
")",
")",
":",
"path",
"replace",
"(",
"'",
"/",
"'",
",",
"'",
"\\",
"\\",
"'",
")",
";",
"}"
] |
[
"returns",
"the",
"access",
"token",
"currently",
"used",
"by",
"streamer",
",",
"for",
"testing",
"only"
] | [
"synchronized",
"token",
"<",
"block",
"token",
"identifier",
">",
"get",
"block",
"token",
"(",
")",
"{",
"return",
"get",
"streamer",
"(",
")",
"get",
"block",
"token",
"(",
")",
";",
"}"
] |
[
"returns",
"a",
"list",
"of",
"all",
"memory",
"blocks",
"that",
"contain",
"any",
"addresses",
"in",
"the",
"given",
"range"
] | [
"list",
"<",
"memory",
"block",
"d",
"b",
">",
"get",
"blocks",
"(",
"address",
"start",
",",
"address",
"end",
")",
"{",
"list",
"<",
"memory",
"block",
"d",
"b",
">",
"list",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"list",
"<",
"memory",
"block",
"d",
"b",
">",
"tmp",
"blocks",
"=",
"blocks",
";",
"int",
"index",
"=",
"collections",
"binary",
"search",
"(",
"tmp",
"blocks",
",",
"start",
",",
"block",
"address",
"comparator",
")",
";",
"if",
"(",
"index",
"<",
"0",
")",
"{",
"index",
"=",
"-",
"index",
"-",
"2",
";",
"}",
"if",
"(",
"index",
">",
"=",
"0",
")",
"{",
"memory",
"block",
"d",
"b",
"block",
"=",
"tmp",
"blocks",
"get",
"(",
"index",
")",
";",
"if",
"(",
"block",
"contains",
"(",
"start",
")",
")",
"{",
"list",
"add",
"(",
"block",
")",
";",
"}",
"}",
"while",
"(",
"+",
"+",
"index",
"<",
"tmp",
"blocks",
"size",
"(",
")",
")",
"{",
"memory",
"block",
"d",
"b",
"block",
"=",
"tmp",
"blocks",
"get",
"(",
"index",
")",
";",
"if",
"(",
"block",
"get",
"start",
"(",
")",
"compare",
"to",
"(",
"end",
")",
">",
"0",
")",
"{",
"break",
";",
"}",
"list",
"add",
"(",
"block",
")",
";",
"}",
"return",
"list",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"returns",
"the",
"size",
"of",
"the",
"frame",
"associated",
"with",
"{",
"@",
"code",
"header",
"}",
",",
"or",
"{",
"@",
"link",
"c",
"#",
"length",
"unset",
"}",
"if",
"it",
"is",
"invalid"
] | [
"public",
"static",
"int",
"get",
"frame",
"size",
"(",
"int",
"header",
"data",
")",
"{",
"if",
"(",
"!",
"is",
"magic",
"present",
"(",
"header",
"data",
")",
")",
"{",
"return",
"c",
"length",
"unset",
";",
"}",
"int",
"version",
"=",
"(",
"header",
"data",
">",
">",
">",
"19",
")",
"&",
"3",
";",
"if",
"(",
"version",
"=",
"=",
"1",
")",
"{",
"return",
"c",
"length",
"unset",
";",
"}",
"int",
"layer",
"=",
"(",
"header",
"data",
">",
">",
">",
"17",
")",
"&",
"3",
";",
"if",
"(",
"layer",
"=",
"=",
"0",
")",
"{",
"return",
"c",
"length",
"unset",
";",
"}",
"int",
"bitrate",
"index",
"=",
"(",
"header",
"data",
">",
">",
">",
"12",
")",
"&",
"15",
";",
"if",
"(",
"bitrate",
"index",
"=",
"=",
"0",
"|",
"|",
"bitrate",
"index",
"=",
"=",
"0x",
"f",
")",
"{",
"/",
"/",
"disallow",
"\"",
"free",
"\"",
"bitrate",
"return",
"c",
"length",
"unset",
";",
"}",
"int",
"sampling",
"rate",
"index",
"=",
"(",
"header",
"data",
">",
">",
">",
"10",
")",
"&",
"3",
";",
"if",
"(",
"sampling",
"rate",
"index",
"=",
"=",
"3",
")",
"{",
"return",
"c",
"length",
"unset",
";",
"}",
"int",
"sampling",
"rate",
"=",
"sampling",
"rate",
"v1",
"[",
"sampling",
"rate",
"index",
"]",
";",
"if",
"(",
"version",
"=",
"=",
"2",
")",
"{",
"/",
"/",
"version",
"2",
"sampling",
"rate",
"/",
"=",
"2",
";",
"}",
"else",
"if",
"(",
"version",
"=",
"=",
"0",
")",
"{",
"/",
"/",
"version",
"2",
"5",
"sampling",
"rate",
"/",
"=",
"4",
";",
"}",
"int",
"bitrate",
";",
"int",
"padding",
"=",
"(",
"header",
"data",
">",
">",
">",
"9",
")",
"&",
"1",
";",
"if",
"(",
"layer",
"=",
"=",
"3",
")",
"{",
"/",
"/",
"layer",
"i",
"(",
"layer",
"=",
"=",
"3",
")",
"bitrate",
"=",
"version",
"=",
"=",
"3",
"?",
"bitrate",
"v1",
"l1",
"[",
"bitrate",
"index",
"-",
"1",
"]",
":",
"bitrate",
"v2",
"l1",
"[",
"bitrate",
"index",
"-",
"1",
"]",
";",
"return",
"(",
"12",
"*",
"bitrate",
"/",
"sampling",
"rate",
"+",
"padding",
")",
"*",
"4",
";",
"}",
"else",
"{",
"/",
"/",
"layer",
"ii",
"(",
"layer",
"=",
"=",
"2",
")",
"or",
"iii",
"(",
"layer",
"=",
"=",
"1",
")",
"if",
"(",
"version",
"=",
"=",
"3",
")",
"{",
"bitrate",
"=",
"layer",
"=",
"=",
"2",
"?",
"bitrate",
"v1",
"l2",
"[",
"bitrate",
"index",
"-",
"1",
"]",
":",
"bitrate",
"v1",
"l3",
"[",
"bitrate",
"index",
"-",
"1",
"]",
";",
"}",
"else",
"{",
"/",
"/",
"version",
"2",
"or",
"2",
"5",
"bitrate",
"=",
"bitrate",
"v2",
"[",
"bitrate",
"index",
"-",
"1",
"]",
";",
"}",
"}",
"if",
"(",
"version",
"=",
"=",
"3",
")",
"{",
"/",
"/",
"version",
"1",
"return",
"144",
"*",
"bitrate",
"/",
"sampling",
"rate",
"+",
"padding",
";",
"}",
"else",
"{",
"/",
"/",
"version",
"2",
"or",
"2",
"5",
"return",
"(",
"layer",
"=",
"=",
"1",
"?",
"72",
":",
"144",
")",
"*",
"bitrate",
"/",
"sampling",
"rate",
"+",
"padding",
";",
"}",
"}"
] |
[
"retrieves",
"the",
"{",
"@",
"link",
"identity",
"link",
"}",
"s",
"associated",
"with",
"the",
"given",
"task",
"such",
"an",
"{",
"@",
"link",
"identity",
"link",
"}",
"informs",
"how",
"a",
"certain",
"identity",
"(",
"eg",
"group",
"or",
"user",
")",
"is",
"associated",
"with",
"a",
"certain",
"task",
"(",
"eg",
"as",
"candidate",
",",
"assignee",
",",
"etc",
")"
] | [
"list",
"<",
"identity",
"link",
">",
"get",
"identity",
"links",
"for",
"task",
"(",
"string",
"task",
"id",
")",
";"
] |
[
"return",
"a",
"{",
"@",
"link",
"content",
"negotiation",
"manager",
"}",
"instance",
"to",
"use",
"to",
"determine",
"requested",
"{",
"@",
"linkplain",
"media",
"type",
"media",
"types",
"}",
"in",
"a",
"given",
"request"
] | [
"public",
"content",
"negotiation",
"manager",
"mvc",
"content",
"negotiation",
"manager",
"(",
")",
"{",
"if",
"(",
"this",
"content",
"negotiation",
"manager",
"=",
"=",
"null",
")",
"{",
"content",
"negotiation",
"configurer",
"configurer",
"=",
"new",
"content",
"negotiation",
"configurer",
"(",
"this",
"servlet",
"context",
")",
";",
"configurer",
"media",
"types",
"(",
"get",
"default",
"media",
"types",
"(",
")",
")",
";",
"configure",
"content",
"negotiation",
"(",
"configurer",
")",
";",
"this",
"content",
"negotiation",
"manager",
"=",
"configurer",
"build",
"content",
"negotiation",
"manager",
"(",
")",
";",
"}",
"return",
"this",
"content",
"negotiation",
"manager",
";",
"}"
] |
[
"set",
"how",
"to",
"group",
"the",
"source",
"data"
] | [
"public",
"builder",
"set",
"unique",
"key",
"(",
"string",
"unique",
"key",
")",
"{",
"return",
"set",
"unique",
"key",
"(",
"arrays",
"as",
"list",
"(",
"unique",
"key",
")",
")",
";",
"}"
] |
[
"creates",
"an",
"empty",
"{",
"@",
"code",
"linked",
"blocking",
"deque",
"}",
"with",
"a",
"capacity",
"of",
"{",
"@",
"link",
"integer",
"#",
"max",
"value",
"}"
] | [
"public",
"static",
"<",
"e",
">",
"linked",
"blocking",
"deque",
"<",
"e",
">",
"new",
"linked",
"blocking",
"deque",
"(",
")",
"{",
"return",
"new",
"linked",
"blocking",
"deque",
"<",
"e",
">",
"(",
")",
";",
"}"
] |
[
"this",
"create",
"has",
"been",
"added",
"to",
"support",
"the",
"file",
"context",
"that",
"processes",
"the",
"permission",
"with",
"umask",
"before",
"calling",
"this",
"method",
"this",
"a",
"temporary",
"method",
"added",
"to",
"support",
"the",
"transition",
"from",
"file",
"system",
"to",
"file",
"context",
"for",
"user",
"applications"
] | [
"protected",
"f",
"s",
"data",
"output",
"stream",
"primitive",
"create",
"(",
"path",
"f",
",",
"fs",
"permission",
"absolute",
"permission",
",",
"enum",
"set",
"<",
"create",
"flag",
">",
"flag",
",",
"int",
"buffer",
"size",
",",
"short",
"replication",
",",
"long",
"block",
"size",
",",
"progressable",
"progress",
",",
"checksum",
"opt",
"checksum",
"opt",
")",
"throws",
"i",
"o",
"exception",
"{",
"boolean",
"path",
"exists",
"=",
"exists",
"(",
"f",
")",
";",
"create",
"flag",
"validate",
"(",
"f",
",",
"path",
"exists",
",",
"flag",
")",
";",
"/",
"/",
"default",
"impl",
"assumes",
"that",
"permissions",
"do",
"not",
"matter",
"and",
"/",
"/",
"nor",
"does",
"the",
"bytes",
"per",
"checksum",
"hence",
"/",
"/",
"calling",
"the",
"regular",
"create",
"is",
"good",
"enough",
"/",
"/",
"f",
"ss",
"that",
"implement",
"permissions",
"should",
"override",
"this",
"if",
"(",
"path",
"exists",
"&",
"&",
"flag",
"contains",
"(",
"create",
"flag",
"append",
")",
")",
"{",
"return",
"append",
"(",
"f",
",",
"buffer",
"size",
",",
"progress",
")",
";",
"}",
"return",
"this",
"create",
"(",
"f",
",",
"absolute",
"permission",
",",
"flag",
"contains",
"(",
"create",
"flag",
"overwrite",
")",
",",
"buffer",
"size",
",",
"replication",
",",
"block",
"size",
",",
"progress",
")",
";",
"}"
] |
[
"converts",
"a",
"long",
"into",
"a",
"padded",
"hex",
"string"
] | [
"public",
"static",
"string",
"to",
"hex",
"string",
"(",
"long",
"l",
")",
"{",
"return",
"zeropad",
"(",
"long",
"to",
"hex",
"string",
"(",
"l",
")",
",",
"16",
")",
";",
"}"
] |
[
"test",
"invalid",
"paths",
"on",
"windows",
"are",
"correctly",
"rejected"
] | [
"public",
"void",
"test",
"invalid",
"windows",
"paths",
"(",
")",
"throws",
"u",
"r",
"i",
"syntax",
"exception",
",",
"i",
"o",
"exception",
"{",
"assume",
"windows",
"(",
")",
";",
"string",
"[",
"]",
"invalid",
"paths",
"=",
"{",
"\"",
"hdfs",
":",
"\\",
"\\",
"\\",
"\\",
"\\",
"\\",
"tmp",
"\"",
"}",
";",
"for",
"(",
"string",
"path",
":",
"invalid",
"paths",
")",
"{",
"try",
"{",
"path",
"item",
"=",
"new",
"path",
"(",
"path",
")",
";",
"fail",
"(",
"\"",
"did",
"not",
"throw",
"for",
"invalid",
"path",
"\"",
"+",
"path",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"iae",
")",
"{",
"}",
"}",
"}"
] |
[
"sets",
"the",
"<",
"code",
">",
"date",
"time",
"<",
"code",
">",
"property"
] | [
"public",
"void",
"set",
"date",
"time",
"(",
"date",
"date",
"time",
")",
"{",
"this",
"date",
"time",
"=",
"date",
"time",
";",
"}"
] |
[
"this",
"implementation",
"returns",
"{",
"@",
"code",
"true",
"}",
"by",
"default",
"allowing",
"other",
"interceptors",
"to",
"be",
"given",
"a",
"chance",
"to",
"handle",
"the",
"error"
] | [
"public",
"<",
"t",
">",
"boolean",
"handle",
"error",
"(",
"native",
"web",
"request",
"request",
",",
"deferred",
"result",
"<",
"t",
">",
"deferred",
"result",
",",
"throwable",
"t",
")",
"throws",
"exception",
"{",
"return",
"true",
";",
"}"
] |
[
"modify",
"the",
"writable",
"to",
"the",
"value",
"from",
"the",
"new",
"value"
] | [
"private",
"static",
"void",
"decode",
"writable",
"(",
"writable",
"obj",
",",
"string",
"new",
"value",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"new",
"value",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"hadoop",
"illegal",
"argument",
"exception",
"(",
"\"",
"invalid",
"argument",
",",
"new",
"value",
"is",
"null",
"\"",
")",
";",
"}",
"base",
"6",
"4",
"decoder",
"=",
"new",
"base",
"6",
"4",
"(",
"0",
",",
"null",
",",
"true",
")",
";",
"data",
"input",
"buffer",
"buf",
"=",
"new",
"data",
"input",
"buffer",
"(",
")",
";",
"byte",
"[",
"]",
"decoded",
"=",
"decoder",
"decode",
"(",
"new",
"value",
")",
";",
"buf",
"reset",
"(",
"decoded",
",",
"decoded",
"length",
")",
";",
"obj",
"read",
"fields",
"(",
"buf",
")",
";",
"}"
] |
[
"test",
"exceptions",
"for",
"three",
"types",
"of",
"broken",
"json",
",",
"missing",
"include",
"exclude",
"and",
"both",
"dist",
"and",
"prepost",
"specified"
] | [
"public",
"void",
"test",
"parser",
"exceptions",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"{",
"x",
"content",
"builder",
"builder",
"=",
"x",
"content",
"factory",
"json",
"builder",
"(",
")",
";",
"builder",
"start",
"object",
"(",
")",
";",
"builder",
"start",
"object",
"(",
"span",
"not",
"query",
"builder",
"name",
")",
";",
"builder",
"field",
"(",
"\"",
"exclude",
"\"",
")",
";",
"span",
"term",
"query",
"(",
"\"",
"description",
"\"",
",",
"\"",
"jumped",
"\"",
")",
"to",
"x",
"content",
"(",
"builder",
",",
"null",
")",
";",
"builder",
"field",
"(",
"\"",
"dist",
"\"",
",",
"2",
")",
";",
"builder",
"end",
"object",
"(",
")",
";",
"builder",
"end",
"object",
"(",
")",
";",
"parsing",
"exception",
"e",
"=",
"expect",
"throws",
"(",
"parsing",
"exception",
"class",
",",
"(",
")",
"-",
">",
"parse",
"query",
"(",
"strings",
"to",
"string",
"(",
"builder",
")",
")",
")",
";",
"assert",
"that",
"(",
"e",
"get",
"detailed",
"message",
"(",
")",
",",
"contains",
"string",
"(",
"\"",
"span",
"not",
"must",
"have",
"[",
"include",
"]",
"\"",
")",
")",
";",
"}",
"{",
"x",
"content",
"builder",
"builder",
"=",
"x",
"content",
"factory",
"json",
"builder",
"(",
")",
";",
"builder",
"start",
"object",
"(",
")",
";",
"builder",
"start",
"object",
"(",
"span",
"not",
"query",
"builder",
"name",
")",
";",
"builder",
"field",
"(",
"\"",
"include",
"\"",
")",
";",
"span",
"near",
"query",
"(",
"query",
"builders",
"span",
"term",
"query",
"(",
"\"",
"description",
"\"",
",",
"\"",
"quick",
"\"",
")",
",",
"1",
")",
"add",
"clause",
"(",
"query",
"builders",
"span",
"term",
"query",
"(",
"\"",
"description",
"\"",
",",
"\"",
"fox",
"\"",
")",
")",
"to",
"x",
"content",
"(",
"builder",
",",
"null",
")",
";",
"builder",
"field",
"(",
"\"",
"dist",
"\"",
",",
"2",
")",
";",
"builder",
"end",
"object",
"(",
")",
";",
"builder",
"end",
"object",
"(",
")",
";",
"parsing",
"exception",
"e",
"=",
"expect",
"throws",
"(",
"parsing",
"exception",
"class",
",",
"(",
")",
"-",
">",
"parse",
"query",
"(",
"strings",
"to",
"string",
"(",
"builder",
")",
")",
")",
";",
"assert",
"that",
"(",
"e",
"get",
"detailed",
"message",
"(",
")",
",",
"contains",
"string",
"(",
"\"",
"span",
"not",
"must",
"have",
"[",
"exclude",
"]",
"\"",
")",
")",
";",
"}",
"{",
"x",
"content",
"builder",
"builder",
"=",
"x",
"content",
"factory",
"json",
"builder",
"(",
")",
";",
"builder",
"start",
"object",
"(",
")",
";",
"builder",
"start",
"object",
"(",
"span",
"not",
"query",
"builder",
"name",
")",
";",
"builder",
"field",
"(",
"\"",
"include",
"\"",
")",
";",
"span",
"near",
"query",
"(",
"query",
"builders",
"span",
"term",
"query",
"(",
"\"",
"description",
"\"",
",",
"\"",
"quick",
"\"",
")",
",",
"1",
")",
"add",
"clause",
"(",
"query",
"builders",
"span",
"term",
"query",
"(",
"\"",
"description",
"\"",
",",
"\"",
"fox",
"\"",
")",
")",
"to",
"x",
"content",
"(",
"builder",
",",
"null",
")",
";",
"builder",
"field",
"(",
"\"",
"exclude",
"\"",
")",
";",
"span",
"term",
"query",
"(",
"\"",
"description",
"\"",
",",
"\"",
"jumped",
"\"",
")",
"to",
"x",
"content",
"(",
"builder",
",",
"null",
")",
";",
"builder",
"field",
"(",
"\"",
"dist",
"\"",
",",
"2",
")",
";",
"builder",
"field",
"(",
"\"",
"pre",
"\"",
",",
"2",
")",
";",
"builder",
"end",
"object",
"(",
")",
";",
"builder",
"end",
"object",
"(",
")",
";",
"parsing",
"exception",
"e",
"=",
"expect",
"throws",
"(",
"parsing",
"exception",
"class",
",",
"(",
")",
"-",
">",
"parse",
"query",
"(",
"strings",
"to",
"string",
"(",
"builder",
")",
")",
")",
";",
"assert",
"that",
"(",
"e",
"get",
"detailed",
"message",
"(",
")",
",",
"contains",
"string",
"(",
"\"",
"span",
"not",
"can",
"either",
"use",
"[",
"dist",
"]",
"or",
"[",
"pre",
"]",
"&",
"[",
"post",
"]",
"(",
"or",
"none",
")",
"\"",
")",
")",
";",
"}",
"}"
] |
[
"get",
"the",
"erasure",
"coding",
"policy",
"information",
"for",
"the",
"specified",
"path"
] | [
"public",
"erasure",
"coding",
"policy",
"get",
"erasure",
"coding",
"policy",
"(",
"string",
"src",
")",
"throws",
"i",
"o",
"exception",
"{",
"check",
"open",
"(",
")",
";",
"try",
"(",
"trace",
"scope",
"ignored",
"=",
"new",
"path",
"trace",
"scope",
"(",
"\"",
"get",
"erasure",
"coding",
"policy",
"\"",
",",
"src",
")",
")",
"{",
"return",
"namenode",
"get",
"erasure",
"coding",
"policy",
"(",
"src",
")",
";",
"}",
"catch",
"(",
"remote",
"exception",
"re",
")",
"{",
"throw",
"re",
"unwrap",
"remote",
"exception",
"(",
"file",
"not",
"found",
"exception",
"class",
",",
"access",
"control",
"exception",
"class",
",",
"unresolved",
"path",
"exception",
"class",
")",
";",
"}",
"}"
] |
[
"move",
"to",
"a",
"new",
"position",
"within",
"the",
"file",
"relative",
"to",
"where",
"the",
"pointer",
"is",
"now",
"always",
"call",
"from",
"a",
"synchronized",
"clause"
] | [
"private",
"synchronized",
"void",
"inc",
"pos",
"(",
"int",
"offset",
")",
"{",
"pos",
"+",
"=",
"offset",
";",
"range",
"offset",
"+",
"=",
"offset",
";",
"swift",
"utils",
"trace",
"(",
"log",
",",
"\"",
"inc",
":",
"pos",
"=",
"%",
"d",
"buffer",
"offset",
"=",
"%",
"d",
"\"",
",",
"pos",
",",
"range",
"offset",
")",
";",
"}"
] |
[
"test",
"modify",
"operations",
"(",
"create",
",",
"mkdir",
",",
"delete",
",",
"etc",
")",
"verify",
"the",
"operation",
"via",
"chrootedfs",
"(",
"ie",
"fc",
")",
"and",
"also",
"via",
"the",
"target",
"file",
"system",
"(",
"ie",
"fclocal",
")",
"that",
"has",
"been",
"chrooted"
] | [
"public",
"void",
"test",
"create",
"delete",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"create",
"file",
"file",
"context",
"test",
"helper",
"create",
"file",
"non",
"recursive",
"(",
"fc",
",",
"\"",
"/",
"foo",
"\"",
")",
";",
"assert",
"assert",
"true",
"(",
"is",
"file",
"(",
"fc",
",",
"new",
"path",
"(",
"\"",
"/",
"foo",
"\"",
")",
")",
")",
";",
"assert",
"assert",
"true",
"(",
"is",
"file",
"(",
"fc",
"target",
",",
"new",
"path",
"(",
"chrooted",
"to",
",",
"\"",
"foo",
"\"",
")",
")",
")",
";",
"/",
"/",
"create",
"file",
"with",
"recursive",
"dir",
"file",
"context",
"test",
"helper",
"create",
"file",
"(",
"fc",
",",
"\"",
"/",
"new",
"dir",
"/",
"foo",
"\"",
")",
";",
"assert",
"assert",
"true",
"(",
"is",
"file",
"(",
"fc",
",",
"new",
"path",
"(",
"\"",
"/",
"new",
"dir",
"/",
"foo",
"\"",
")",
")",
")",
";",
"assert",
"assert",
"true",
"(",
"is",
"file",
"(",
"fc",
"target",
",",
"new",
"path",
"(",
"chrooted",
"to",
",",
"\"",
"new",
"dir",
"/",
"foo",
"\"",
")",
")",
")",
";",
"/",
"/",
"delete",
"the",
"created",
"file",
"assert",
"assert",
"true",
"(",
"fc",
"delete",
"(",
"new",
"path",
"(",
"\"",
"/",
"new",
"dir",
"/",
"foo",
"\"",
")",
",",
"false",
")",
")",
";",
"assert",
"assert",
"false",
"(",
"exists",
"(",
"fc",
",",
"new",
"path",
"(",
"\"",
"/",
"new",
"dir",
"/",
"foo",
"\"",
")",
")",
")",
";",
"assert",
"assert",
"false",
"(",
"exists",
"(",
"fc",
"target",
",",
"new",
"path",
"(",
"chrooted",
"to",
",",
"\"",
"new",
"dir",
"/",
"foo",
"\"",
")",
")",
")",
";",
"/",
"/",
"create",
"file",
"with",
"a",
"2",
"component",
"dirs",
"recursively",
"file",
"context",
"test",
"helper",
"create",
"file",
"(",
"fc",
",",
"\"",
"/",
"new",
"dir",
"/",
"new",
"dir",
"2",
"/",
"foo",
"\"",
")",
";",
"assert",
"assert",
"true",
"(",
"is",
"file",
"(",
"fc",
",",
"new",
"path",
"(",
"\"",
"/",
"new",
"dir",
"/",
"new",
"dir",
"2",
"/",
"foo",
"\"",
")",
")",
")",
";",
"assert",
"assert",
"true",
"(",
"is",
"file",
"(",
"fc",
"target",
",",
"new",
"path",
"(",
"chrooted",
"to",
",",
"\"",
"new",
"dir",
"/",
"new",
"dir",
"2",
"/",
"foo",
"\"",
")",
")",
")",
";",
"/",
"/",
"delete",
"the",
"created",
"file",
"assert",
"assert",
"true",
"(",
"fc",
"delete",
"(",
"new",
"path",
"(",
"\"",
"/",
"new",
"dir",
"/",
"new",
"dir",
"2",
"/",
"foo",
"\"",
")",
",",
"false",
")",
")",
";",
"assert",
"assert",
"false",
"(",
"exists",
"(",
"fc",
",",
"new",
"path",
"(",
"\"",
"/",
"new",
"dir",
"/",
"new",
"dir",
"2",
"/",
"foo",
"\"",
")",
")",
")",
";",
"assert",
"assert",
"false",
"(",
"exists",
"(",
"fc",
"target",
",",
"new",
"path",
"(",
"chrooted",
"to",
",",
"\"",
"new",
"dir",
"/",
"new",
"dir",
"2",
"/",
"foo",
"\"",
")",
")",
")",
";",
"}"
] |
[
"find",
"the",
"fields",
"constant",
"that",
"matches",
"field",
"id",
",",
"throwing",
"an",
"exception",
"if",
"it",
"is",
"not",
"found"
] | [
"public",
"static",
"fields",
"find",
"by",
"thrift",
"id",
"or",
"throw",
"(",
"int",
"field",
"id",
")",
"{",
"fields",
"fields",
"=",
"find",
"by",
"thrift",
"id",
"(",
"field",
"id",
")",
";",
"if",
"(",
"fields",
"=",
"=",
"null",
")",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"field",
"\"",
"+",
"field",
"id",
"+",
"\"",
"doesn",
"'",
"t",
"exist",
"!",
"\"",
")",
";",
"return",
"fields",
";",
"}"
] |
[
"assert",
"that",
"the",
"code",
"units",
"from",
"the",
"two",
"indicated",
"programs",
"are",
"the",
"same",
"for",
"the",
"addresses",
"indicated",
"by",
"the",
"address",
"set",
"if",
"not",
"then",
"a",
"j",
"unit",
"failure",
"occurs"
] | [
"protected",
"void",
"assert",
"same",
"code",
"units",
"(",
"program",
"p",
"1",
",",
"program",
"p",
"2",
",",
"address",
"set",
"view",
"addrs",
")",
"throws",
"program",
"conflict",
"exception",
"{",
"program",
"diff",
"diff",
"=",
"new",
"program",
"diff",
"(",
"p",
"1",
",",
"p",
"2",
",",
"addrs",
")",
";",
"address",
"set",
"view",
"diffs",
";",
"try",
"{",
"diffs",
"=",
"diff",
"get",
"differences",
"(",
"new",
"program",
"diff",
"filter",
"(",
"program",
"diff",
"filter",
"code",
"unit",
"diffs",
")",
",",
"task",
"monitor",
"dummy",
")",
";",
"assert",
"true",
"(",
"\"",
"not",
"same",
"code",
"units",
"at",
"\"",
"+",
"diffs",
"to",
"string",
"(",
")",
",",
"diffs",
"is",
"empty",
"(",
")",
")",
";",
"}",
"catch",
"(",
"cancelled",
"exception",
"e",
")",
"{",
"throw",
"new",
"assert",
"exception",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"create",
"the",
"panel",
"for",
"this",
"dialog"
] | [
"private",
"j",
"panel",
"create",
"panel",
"(",
")",
"{",
"j",
"panel",
"panel",
"=",
"new",
"j",
"panel",
"(",
")",
";",
"panel",
"set",
"layout",
"(",
"new",
"border",
"layout",
"(",
")",
")",
";",
"j",
"panel",
"parent",
"panel",
"=",
"new",
"j",
"panel",
"(",
"new",
"border",
"layout",
"(",
")",
")",
";",
"/",
"/",
"/",
"/",
"create",
"button",
"panel",
"/",
"/",
"select",
"all",
"button",
"=",
"new",
"j",
"button",
"(",
"select",
"all",
")",
";",
"select",
"all",
"button",
"set",
"mnemonic",
"(",
"'",
"a",
"'",
")",
";",
"deselect",
"all",
"button",
"=",
"new",
"j",
"button",
"(",
"deselect",
"all",
")",
";",
"deselect",
"all",
"button",
"set",
"mnemonic",
"(",
"'",
"n",
"'",
")",
";",
"j",
"panel",
"button",
"panel",
"=",
"button",
"panel",
"factory",
"create",
"button",
"panel",
"(",
"new",
"j",
"button",
"[",
"]",
"{",
"select",
"all",
"button",
",",
"deselect",
"all",
"button",
"}",
")",
";",
"/",
"/",
"/",
"/",
"list",
"panel",
"/",
"/",
"list",
"panel",
"=",
"new",
"list",
"panel",
"(",
")",
";",
"list",
"panel",
"set",
"cell",
"renderer",
"(",
"new",
"data",
"cell",
"renderer",
"(",
")",
")",
";",
"list",
"panel",
"set",
"mouse",
"listener",
"(",
"new",
"list",
"mouse",
"listener",
"(",
")",
")",
";",
"/",
"/",
"layout",
"main",
"panel",
"parent",
"panel",
"add",
"(",
"button",
"panel",
",",
"border",
"layout",
"east",
")",
";",
"parent",
"panel",
"add",
"(",
"list",
"panel",
",",
"border",
"layout",
"center",
")",
";",
"parent",
"panel",
"set",
"border",
"(",
"new",
"titled",
"border",
"(",
"\"",
"data",
"\"",
")",
")",
";",
"panel",
"add",
"(",
"parent",
"panel",
",",
"border",
"layout",
"center",
")",
";",
"return",
"panel",
";",
"}"
] |
[
"determine",
"principal",
"id",
"from",
"attributes"
] | [
"public",
"string",
"determine",
"principal",
"id",
"from",
"attributes",
"(",
"final",
"string",
"default",
"id",
",",
"final",
"map",
"<",
"string",
",",
"list",
"<",
"object",
">",
">",
"attributes",
")",
"{",
"return",
"function",
"utils",
"do",
"if",
"(",
"string",
"utils",
"is",
"not",
"blank",
"(",
"this",
"attribute",
")",
"&",
"&",
"attributes",
"contains",
"key",
"(",
"this",
"attribute",
")",
",",
"(",
")",
"-",
">",
"{",
"val",
"attribute",
"value",
"=",
"attributes",
"get",
"(",
"this",
"attribute",
")",
";",
"logger",
"debug",
"(",
"\"",
"using",
"attribute",
"[",
"{",
"}",
"]",
"to",
"establish",
"principal",
"id",
"\"",
",",
"this",
"attribute",
")",
";",
"val",
"element",
"=",
"collection",
"utils",
"first",
"element",
"(",
"attribute",
"value",
")",
";",
"return",
"element",
"map",
"(",
"object",
":",
":",
"to",
"string",
")",
"or",
"else",
"(",
"null",
")",
";",
"}",
",",
"(",
")",
"-",
">",
"{",
"logger",
"debug",
"(",
"\"",
"using",
"principal",
"id",
"[",
"{",
"}",
"]",
"to",
"generate",
"persistent",
"identifier",
"\"",
",",
"default",
"id",
")",
";",
"return",
"default",
"id",
";",
"}",
")",
"get",
"(",
")",
";",
"}"
] |
[
"register",
"a",
"script",
"template",
"view",
"resolver",
"with",
"an",
"empty",
"default",
"view",
"name",
"prefix",
"and",
"suffix",
"note",
"that",
"you",
"must",
"also",
"configure",
"script",
"templating",
"by",
"adding",
"a",
"{",
"@",
"link",
"script",
"template",
"configurer",
"}",
"bean"
] | [
"public",
"url",
"based",
"view",
"resolver",
"registration",
"script",
"template",
"(",
")",
"{",
"if",
"(",
"!",
"check",
"bean",
"of",
"type",
"(",
"script",
"template",
"configurer",
"class",
")",
")",
"{",
"throw",
"new",
"bean",
"initialization",
"exception",
"(",
"\"",
"in",
"addition",
"to",
"a",
"script",
"template",
"view",
"resolver",
"\"",
"+",
"\"",
"there",
"must",
"also",
"be",
"a",
"single",
"script",
"template",
"config",
"bean",
"in",
"this",
"web",
"application",
"context",
"\"",
"+",
"\"",
"(",
"or",
"its",
"parent",
")",
":",
"script",
"template",
"configurer",
"is",
"the",
"usual",
"implementation",
"\"",
"+",
"\"",
"this",
"bean",
"may",
"be",
"given",
"any",
"name",
"\"",
")",
";",
"}",
"script",
"registration",
"registration",
"=",
"new",
"script",
"registration",
"(",
")",
";",
"url",
"based",
"view",
"resolver",
"resolver",
"=",
"registration",
"get",
"view",
"resolver",
"(",
")",
";",
"if",
"(",
"this",
"application",
"context",
"!",
"=",
"null",
")",
"{",
"resolver",
"set",
"application",
"context",
"(",
"this",
"application",
"context",
")",
";",
"}",
"this",
"view",
"resolvers",
"add",
"(",
"resolver",
")",
";",
"return",
"registration",
";",
"}"
] |
[
"method",
"to",
"validate",
"and",
"set",
"the",
"precision",
"value"
] | [
"public",
"abstract",
"geo",
"grid",
"aggregation",
"builder",
"precision",
"(",
"int",
"precision",
")",
";"
] |
[
"tests",
"that",
"packets",
"that",
"are",
"too",
"big",
"during",
"kafka",
"sasl",
"handshake",
"request",
"flow",
"or",
"the",
"actual",
"sasl",
"authentication",
"flow",
"result",
"in",
"authentication",
"failure",
"and",
"do",
"not",
"cause",
"any",
"failures",
"in",
"the",
"server"
] | [
"public",
"void",
"test",
"packet",
"size",
"too",
"big",
"(",
")",
"throws",
"exception",
"{",
"security",
"protocol",
"security",
"protocol",
"=",
"security",
"protocol",
"sasl",
"plaintext",
";",
"configure",
"mechanisms",
"(",
"\"",
"plain",
"\"",
",",
"arrays",
"as",
"list",
"(",
"\"",
"plain",
"\"",
")",
")",
";",
"server",
"=",
"create",
"echo",
"server",
"(",
"security",
"protocol",
")",
";",
"/",
"/",
"send",
"sasl",
"packet",
"with",
"large",
"size",
"after",
"valid",
"handshake",
"request",
"string",
"node",
"1",
"=",
"\"",
"invalid",
"1",
"\"",
";",
"create",
"client",
"connection",
"(",
"security",
"protocol",
"plaintext",
",",
"node",
"1",
")",
";",
"send",
"handshake",
"request",
"receive",
"response",
"(",
"node",
"1",
",",
"(",
"short",
")",
"1",
")",
";",
"byte",
"buffer",
"buffer",
"=",
"byte",
"buffer",
"allocate",
"(",
"1024",
")",
";",
"buffer",
"put",
"int",
"(",
"integer",
"max",
"value",
")",
";",
"buffer",
"put",
"(",
"new",
"byte",
"[",
"buffer",
"capacity",
"(",
")",
"-",
"4",
"]",
")",
";",
"buffer",
"rewind",
"(",
")",
";",
"selector",
"send",
"(",
"new",
"network",
"send",
"(",
"node",
"1",
",",
"byte",
"buffer",
"send",
"size",
"prefixed",
"(",
"buffer",
")",
")",
")",
";",
"network",
"test",
"utils",
"wait",
"for",
"channel",
"close",
"(",
"selector",
",",
"node",
"1",
",",
"channel",
"state",
"ready",
"state",
"(",
")",
")",
";",
"selector",
"close",
"(",
")",
";",
"/",
"/",
"test",
"good",
"connection",
"still",
"works",
"create",
"and",
"check",
"client",
"connection",
"(",
"security",
"protocol",
",",
"\"",
"good",
"1",
"\"",
")",
";",
"/",
"/",
"send",
"packet",
"with",
"large",
"size",
"before",
"handshake",
"request",
"string",
"node",
"2",
"=",
"\"",
"invalid",
"2",
"\"",
";",
"create",
"client",
"connection",
"(",
"security",
"protocol",
"plaintext",
",",
"node",
"2",
")",
";",
"buffer",
"clear",
"(",
")",
";",
"buffer",
"put",
"int",
"(",
"integer",
"max",
"value",
")",
";",
"buffer",
"put",
"(",
"new",
"byte",
"[",
"buffer",
"capacity",
"(",
")",
"-",
"4",
"]",
")",
";",
"buffer",
"rewind",
"(",
")",
";",
"selector",
"send",
"(",
"new",
"network",
"send",
"(",
"node",
"2",
",",
"byte",
"buffer",
"send",
"size",
"prefixed",
"(",
"buffer",
")",
")",
")",
";",
"network",
"test",
"utils",
"wait",
"for",
"channel",
"close",
"(",
"selector",
",",
"node",
"2",
",",
"channel",
"state",
"ready",
"state",
"(",
")",
")",
";",
"selector",
"close",
"(",
")",
";",
"/",
"/",
"test",
"good",
"connection",
"still",
"works",
"create",
"and",
"check",
"client",
"connection",
"(",
"security",
"protocol",
",",
"\"",
"good",
"2",
"\"",
")",
";",
"}"
] |
[
"creates",
"a",
"directory",
"and",
"any",
"ancestor",
"directories",
"required"
] | [
"private",
"static",
"void",
"mkdirs",
"(",
"file",
"system",
"fs",
",",
"path",
"dir",
")",
"throws",
"exception",
"{",
"assert",
"true",
"(",
"\"",
"failed",
"to",
"mkdir",
"\"",
"+",
"dir",
",",
"fs",
"mkdirs",
"(",
"dir",
")",
")",
";",
"}"
] |
[
"add",
"a",
"test",
"hook",
"to",
"modify",
"the",
"operation",
"context",
"we",
"use",
"for",
"azure",
"storage",
"operations"
] | [
"void",
"add",
"test",
"hook",
"to",
"operation",
"context",
"(",
"test",
"hook",
"operation",
"context",
"test",
"hook",
")",
"{",
"this",
"test",
"hook",
"operation",
"context",
"=",
"test",
"hook",
";",
"}"
] |
[
"return",
"true",
"if",
"it",
"is",
"possible",
"that",
"this",
"could",
"emit",
"more",
"values"
] | [
"public",
"boolean",
"has",
"next",
"(",
")",
"{",
"return",
"jc",
"has",
"next",
"(",
")",
"|",
"|",
"!",
"q",
"is",
"empty",
"(",
")",
";",
"}"
] |
[
"create",
"a",
"named",
"instance",
"with",
"provided",
"name"
] | [
"public",
"static",
"named",
"as",
"(",
"final",
"string",
"name",
")",
"{",
"objects",
"require",
"non",
"null",
"(",
"name",
",",
"\"",
"name",
"can",
"'",
"t",
"be",
"null",
"\"",
")",
";",
"return",
"new",
"named",
"(",
"name",
")",
";",
"}"
] |
[
"executes",
"an",
"action",
"if",
"an",
"action",
"has",
"failed",
"and",
"an",
"exception",
"is",
"ignorable",
"then",
"propagate",
"it",
"as",
"hystrix",
"bad",
"request",
"exception",
"otherwise",
"propagate",
"original",
"exception",
"to",
"trigger",
"fallback",
"method",
"note",
":",
"if",
"an",
"exception",
"occurred",
"in",
"a",
"command",
"directly",
"extends",
"{",
"@",
"link",
"java",
"lang",
"throwable",
"}",
"then",
"this",
"exception",
"cannot",
"be",
"re",
"-",
"thrown",
"as",
"original",
"exception",
"because",
"hystrix",
"command",
"run",
"(",
")",
"allows",
"throw",
"subclasses",
"of",
"{",
"@",
"link",
"java",
"lang",
"exception",
"}",
"thus",
"we",
"need",
"to",
"wrap",
"cause",
"in",
"runtime",
"exception",
",",
"anyway",
"in",
"this",
"case",
"the",
"fallback",
"logic",
"will",
"be",
"triggered"
] | [
"object",
"process",
"(",
"action",
"action",
")",
"throws",
"exception",
"{",
"object",
"result",
";",
"try",
"{",
"result",
"=",
"action",
"execute",
"(",
")",
";",
"flush",
"cache",
"(",
")",
";",
"}",
"catch",
"(",
"command",
"action",
"execution",
"exception",
"throwable",
")",
"{",
"throwable",
"cause",
"=",
"throwable",
"get",
"cause",
"(",
")",
";",
"if",
"(",
"is",
"ignorable",
"(",
"cause",
")",
")",
"{",
"throw",
"new",
"hystrix",
"bad",
"request",
"exception",
"(",
"cause",
"get",
"message",
"(",
")",
",",
"cause",
")",
";",
"}",
"if",
"(",
"cause",
"instanceof",
"runtime",
"exception",
")",
"{",
"throw",
"(",
"runtime",
"exception",
")",
"cause",
";",
"}",
"else",
"if",
"(",
"cause",
"instanceof",
"exception",
")",
"{",
"throw",
"(",
"exception",
")",
"cause",
";",
"}",
"else",
"{",
"/",
"/",
"instance",
"of",
"throwable",
"throw",
"new",
"command",
"action",
"execution",
"exception",
"(",
"cause",
")",
";",
"}",
"}",
"return",
"result",
";",
"}"
] |
[
"clone",
"an",
"input",
"bytes",
"array",
"as",
"direct",
"byte",
"buffer"
] | [
"static",
"byte",
"buffer",
"clone",
"as",
"direct",
"byte",
"buffer",
"(",
"byte",
"[",
"]",
"input",
",",
"int",
"offset",
",",
"int",
"len",
")",
"{",
"if",
"(",
"input",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"an",
"input",
"can",
"be",
"null",
",",
"if",
"erased",
"or",
"not",
"to",
"read",
"return",
"null",
";",
"}",
"byte",
"buffer",
"direct",
"buffer",
"=",
"byte",
"buffer",
"allocate",
"direct",
"(",
"len",
")",
";",
"direct",
"buffer",
"put",
"(",
"input",
",",
"offset",
",",
"len",
")",
";",
"direct",
"buffer",
"flip",
"(",
")",
";",
"return",
"direct",
"buffer",
";",
"}"
] |
[
"set",
"if",
"the",
"command",
"has",
"timed",
"out"
] | [
"private",
"void",
"set",
"timed",
"out",
"(",
")",
"{",
"this",
"timed",
"out",
"set",
"(",
"true",
")",
";",
"}"
] |
[
"the",
"set",
"of",
"enumsflags",
"defined",
"in",
"this",
"attribute",
"only",
"makes",
"sense",
"if",
"the",
"format",
"includes",
"either",
"format",
"flags",
":",
":",
"enum",
"or",
"format",
"flags",
":",
":",
"flags",
"having",
"both",
"is",
"an",
"error",
"<",
"code",
">",
"repeated",
"aapt",
"pb",
"attribute",
"symbol",
"symbol",
"=",
"4",
";",
"<",
"code",
">"
] | [
"public",
"com",
"android",
"aapt",
"resources",
"attribute",
"symbol",
"get",
"symbol",
"(",
"int",
"index",
")",
"{",
"return",
"instance",
"get",
"symbol",
"(",
"index",
")",
";",
"}"
] |
[
"convert",
"the",
"given",
"object",
"to",
"serialized",
"form",
",",
"possibly",
"using",
"a",
"{",
"@",
"link",
"org",
"springframework",
"messaging",
"converter",
"message",
"converter",
"}",
",",
"wrap",
"it",
"as",
"a",
"message",
"with",
"the",
"given",
"headers",
"and",
"send",
"it",
"to",
"the",
"given",
"destination"
] | [
"void",
"convert",
"and",
"send",
"(",
"d",
"destination",
",",
"object",
"payload",
",",
"map",
"<",
"string",
",",
"object",
">",
"headers",
")",
"throws",
"messaging",
"exception",
";"
] |
[
"called",
"when",
"an",
"event",
"-",
"time",
"timer",
"that",
"was",
"set",
"using",
"the",
"trigger",
"context",
"fires",
"note",
":",
"this",
"method",
"is",
"not",
"called",
"in",
"case",
"the",
"window",
"does",
"not",
"contain",
"any",
"elements",
"thus",
",",
"if",
"you",
"return",
"{",
"@",
"code",
"purge",
"}",
"from",
"a",
"trigger",
"method",
"and",
"you",
"expect",
"to",
"do",
"cleanup",
"in",
"a",
"future",
"invocation",
"of",
"a",
"timer",
"callback",
"it",
"might",
"be",
"wise",
"to",
"clean",
"any",
"state",
"that",
"you",
"would",
"clean",
"in",
"the",
"timer",
"callback"
] | [
"public",
"abstract",
"boolean",
"on",
"event",
"time",
"(",
"long",
"time",
",",
"w",
"window",
")",
"throws",
"exception",
";"
] |
[
"returns",
"the",
"preferred",
"resource",
"of",
"this",
"operator",
"if",
"no",
"preferred",
"resource",
"has",
"been",
"set",
",",
"it",
"returns",
"the",
"default",
"empty",
"resource"
] | [
"public",
"resource",
"spec",
"get",
"preferred",
"resources",
"(",
")",
"{",
"return",
"this",
"preferred",
"resources",
";",
"}"
] |
[
"allocate",
"a",
"{",
"@",
"link",
"composite",
"byte",
"buf",
"}",
"with",
"the",
"given",
"maximum",
"number",
"of",
"components",
"that",
"can",
"be",
"stored",
"in",
"it",
"if",
"it",
"is",
"a",
"direct",
"or",
"heap",
"buffer",
"depends",
"on",
"the",
"actual",
"implementation"
] | [
"composite",
"byte",
"buf",
"composite",
"buffer",
"(",
"int",
"max",
"num",
"components",
")",
";"
] |
[
"sets",
"the",
"value",
"of",
"\"",
"end",
"\"",
"which",
"is",
"a",
"timestamp",
"only",
"influencers",
"whose",
"timestamp",
"is",
"before",
"the",
"\"",
"end",
"\"",
"value",
"will",
"be",
"returned"
] | [
"public",
"void",
"set",
"end",
"(",
"string",
"end",
")",
"{",
"this",
"end",
"=",
"end",
";",
"}"
] |
[
"activates",
"the",
"safety",
"net",
"for",
"a",
"thread",
"{",
"@",
"link",
"file",
"system",
"}",
"instances",
"obtained",
"by",
"the",
"thread",
"that",
"called",
"this",
"method",
"will",
"be",
"guarded",
",",
"meaning",
"that",
"their",
"created",
"streams",
"are",
"tracked",
"and",
"can",
"be",
"closed",
"via",
"the",
"safety",
"net",
"closing",
"hook",
"this",
"method",
"should",
"be",
"called",
"at",
"the",
"beginning",
"of",
"a",
"thread",
"that",
"should",
"be",
"guarded"
] | [
"public",
"static",
"void",
"initialize",
"safety",
"net",
"for",
"thread",
"(",
")",
"{",
"safety",
"net",
"closeable",
"registry",
"old",
"registry",
"=",
"registries",
"get",
"(",
")",
";",
"check",
"state",
"(",
"null",
"=",
"=",
"old",
"registry",
",",
"\"",
"found",
"an",
"existing",
"file",
"system",
"safety",
"net",
"for",
"this",
"thread",
":",
"%",
"s",
"\"",
"+",
"\"",
"this",
"may",
"indicate",
"an",
"accidental",
"repeated",
"initialization",
",",
"or",
"a",
"leak",
"of",
"the",
"\"",
"+",
"\"",
"(",
"inheritable",
")",
"thread",
"local",
"through",
"a",
"thread",
"pool",
"\"",
",",
"old",
"registry",
")",
";",
"safety",
"net",
"closeable",
"registry",
"new",
"registry",
"=",
"new",
"safety",
"net",
"closeable",
"registry",
"(",
")",
";",
"registries",
"set",
"(",
"new",
"registry",
")",
";",
"}"
] |
[
"return",
"the",
"total",
"number",
"of",
"occurrences",
"of",
"this",
"term",
"in",
"the",
"index",
",",
"or",
"{",
"@",
"code",
"-",
"1",
"}",
"if",
"this",
"statistic",
"is",
"not",
"available"
] | [
"public",
"long",
"get",
"total",
"term",
"freq",
"(",
")",
"{",
"return",
"total",
"term",
"freq",
";",
"}"
] |
[
"tests",
"simple",
"reducing",
"state",
"queryable",
"state",
"instance",
"each",
"source",
"emits",
"(",
"subtask",
"index",
",",
"0",
")",
"(",
"subtask",
"index",
",",
"num",
"elements",
")",
"tuples",
",",
"which",
"are",
"then",
"queried",
"the",
"reducing",
"state",
"instance",
"sums",
"these",
"up",
"the",
"test",
"succeeds",
"after",
"each",
"subtask",
"index",
"is",
"queried",
"with",
"result",
"n",
"(",
"n",
"+",
"1",
")",
"2"
] | [
"public",
"void",
"test",
"reducing",
"state",
"(",
")",
"throws",
"exception",
"{",
"final",
"deadline",
"deadline",
"=",
"deadline",
"now",
"(",
")",
"plus",
"(",
"test",
"timeout",
")",
";",
"final",
"long",
"num",
"elements",
"=",
"1024l",
";",
"stream",
"execution",
"environment",
"env",
"=",
"stream",
"execution",
"environment",
"get",
"execution",
"environment",
"(",
")",
";",
"env",
"set",
"state",
"backend",
"(",
"state",
"backend",
")",
";",
"env",
"set",
"parallelism",
"(",
"max",
"parallelism",
")",
";",
"/",
"/",
"very",
"important",
",",
"because",
"cluster",
"is",
"shared",
"between",
"tests",
"and",
"we",
"/",
"/",
"don",
"'",
"t",
"explicitly",
"check",
"that",
"all",
"slots",
"are",
"available",
"before",
"/",
"/",
"submitting",
"env",
"set",
"restart",
"strategy",
"(",
"restart",
"strategies",
"fixed",
"delay",
"restart",
"(",
"integer",
"max",
"value",
",",
"1000l",
")",
")",
";",
"data",
"stream",
"<",
"tuple",
"2",
"<",
"integer",
",",
"long",
">",
">",
"source",
"=",
"env",
"add",
"source",
"(",
"new",
"test",
"ascending",
"value",
"source",
"(",
"num",
"elements",
")",
")",
";",
"reducing",
"state",
"descriptor",
"<",
"tuple",
"2",
"<",
"integer",
",",
"long",
">",
">",
"reducing",
"state",
"=",
"new",
"reducing",
"state",
"descriptor",
"<",
">",
"(",
"\"",
"any",
"\"",
",",
"new",
"sum",
"reduce",
"(",
")",
",",
"source",
"get",
"type",
"(",
")",
")",
";",
"source",
"key",
"by",
"(",
"new",
"key",
"selector",
"<",
"tuple",
"2",
"<",
"integer",
",",
"long",
">",
",",
"integer",
">",
"(",
")",
"{",
"private",
"static",
"final",
"long",
"serial",
"version",
"u",
"i",
"d",
"=",
"8470749712274833552l",
";",
"@",
"override",
"public",
"integer",
"get",
"key",
"(",
"tuple",
"2",
"<",
"integer",
",",
"long",
">",
"value",
")",
"{",
"return",
"value",
"f",
"0",
";",
"}",
"}",
")",
"as",
"queryable",
"state",
"(",
"\"",
"jungle",
"\"",
",",
"reducing",
"state",
")",
";",
"try",
"(",
"auto",
"cancellable",
"job",
"auto",
"cancellable",
"job",
"=",
"new",
"auto",
"cancellable",
"job",
"(",
"deadline",
",",
"cluster",
"client",
",",
"env",
")",
")",
"{",
"final",
"job",
"i",
"d",
"job",
"id",
"=",
"auto",
"cancellable",
"job",
"get",
"job",
"id",
"(",
")",
";",
"final",
"job",
"graph",
"job",
"graph",
"=",
"auto",
"cancellable",
"job",
"get",
"job",
"graph",
"(",
")",
";",
"cluster",
"client",
"submit",
"job",
"(",
"job",
"graph",
")",
"get",
"(",
")",
";",
"final",
"long",
"expected",
"=",
"num",
"elements",
"*",
"(",
"num",
"elements",
"+",
"1l",
")",
"/",
"2l",
";",
"for",
"(",
"int",
"key",
"=",
"0",
";",
"key",
"<",
"max",
"parallelism",
";",
"key",
"+",
"+",
")",
"{",
"boolean",
"success",
"=",
"false",
";",
"while",
"(",
"deadline",
"has",
"time",
"left",
"(",
")",
"&",
"&",
"!",
"success",
")",
"{",
"completable",
"future",
"<",
"reducing",
"state",
"<",
"tuple",
"2",
"<",
"integer",
",",
"long",
">",
">",
">",
"future",
"=",
"get",
"kv",
"state",
"(",
"deadline",
",",
"client",
",",
"job",
"id",
",",
"\"",
"jungle",
"\"",
",",
"key",
",",
"basic",
"type",
"info",
"int",
"type",
"info",
",",
"reducing",
"state",
",",
"false",
",",
"executor",
")",
";",
"tuple",
"2",
"<",
"integer",
",",
"long",
">",
"value",
"=",
"future",
"get",
"(",
"deadline",
"time",
"left",
"(",
")",
"to",
"millis",
"(",
")",
",",
"time",
"unit",
"milliseconds",
")",
"get",
"(",
")",
";",
"assert",
"equals",
"(",
"\"",
"key",
"mismatch",
"\"",
",",
"key",
",",
"value",
"f",
"0",
"int",
"value",
"(",
")",
")",
";",
"if",
"(",
"expected",
"=",
"=",
"value",
"f",
"1",
")",
"{",
"success",
"=",
"true",
";",
"}",
"else",
"{",
"/",
"/",
"retry",
"thread",
"sleep",
"(",
"retry",
"timeout",
")",
";",
"}",
"}",
"assert",
"true",
"(",
"\"",
"did",
"not",
"succeed",
"query",
"\"",
",",
"success",
")",
";",
"}",
"}",
"}"
] |
[
"dispose",
"the",
"manager",
"and",
"releases",
"all",
"message",
"buses",
"and",
"loaders"
] | [
"public",
"void",
"dispose",
"(",
")",
"{",
"if",
"(",
"debug",
")",
"{",
"log",
"d",
"(",
"tag",
",",
"\"",
"close",
"(",
")",
"called",
"\"",
")",
";",
"}",
"debounced",
"signal",
"on",
"complete",
"(",
")",
";",
"debounced",
"loader",
"dispose",
"(",
")",
";",
"play",
"queue",
"reactor",
"cancel",
"(",
")",
";",
"loader",
"reactor",
"dispose",
"(",
")",
";",
"}"
] |
[
"called",
"when",
"state",
"changes"
] | [
"void",
"on",
"change",
"(",
"final",
"thread",
"thread",
",",
"final",
"thread",
"state",
"transition",
"validator",
"new",
"state",
",",
"final",
"thread",
"state",
"transition",
"validator",
"old",
"state",
")",
";"
] |
[
"indicates",
"whether",
"{",
"@",
"code",
"flag",
"}",
"is",
"set",
"on",
"this",
"provider"
] | [
"public",
"boolean",
"is",
"(",
"flag",
"flag",
")",
"{",
"return",
"get",
"(",
"flag",
")",
"to",
"list",
"(",
")",
"contains",
"(",
"flag",
")",
";",
"}"
] |
[
"releases",
"the",
"media",
"period",
"no",
"other",
"method",
"should",
"be",
"called",
"after",
"the",
"release"
] | [
"public",
"void",
"release",
"(",
")",
"{",
"disable",
"track",
"selections",
"in",
"result",
"(",
")",
";",
"release",
"media",
"period",
"(",
"info",
"end",
"position",
"us",
",",
"media",
"source",
"list",
",",
"media",
"period",
")",
";",
"}"
] |
[
"returns",
"whether",
"this",
"spawn",
"may",
"be",
"executing",
"concurrently",
"under",
"multiple",
"spawn",
"runners",
"if",
"so",
",",
"{",
"@",
"link",
"#",
"lock",
"output",
"files",
"}",
"may",
"raise",
"{",
"@",
"link",
"interrupted",
"exception",
"}"
] | [
"boolean",
"speculating",
"(",
")",
";"
] |
[
"clears",
"the",
"current",
"highlight",
"sets",
"this",
"script",
"'",
"s",
"highlight",
"state",
"(",
"both",
"the",
"local",
"variable",
"current",
"highlight",
"and",
"the",
"ghidra",
"state",
"'",
"s",
"current",
"highlight",
")",
"to",
"null",
"also",
"clears",
"the",
"tool",
"'",
"s",
"highlight",
"if",
"the",
"tool",
"exists"
] | [
"public",
"void",
"remove",
"highlight",
"(",
")",
"{",
"create",
"highlight",
"(",
"create",
"address",
"set",
"(",
")",
")",
";",
"}"
] |
[
"hashes",
"a",
"specified",
"key",
"into",
"several",
"integers"
] | [
"public",
"int",
"[",
"]",
"hash",
"(",
"key",
"k",
")",
"{",
"byte",
"[",
"]",
"b",
"=",
"k",
"get",
"bytes",
"(",
")",
";",
"if",
"(",
"b",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"null",
"pointer",
"exception",
"(",
"\"",
"buffer",
"reference",
"is",
"null",
"\"",
")",
";",
"}",
"if",
"(",
"b",
"length",
"=",
"=",
"0",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"key",
"length",
"must",
"be",
">",
"0",
"\"",
")",
";",
"}",
"int",
"[",
"]",
"result",
"=",
"new",
"int",
"[",
"nb",
"hash",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"initval",
"=",
"0",
";",
"i",
"<",
"nb",
"hash",
";",
"i",
"+",
"+",
")",
"{",
"initval",
"=",
"hash",
"function",
"hash",
"(",
"b",
",",
"initval",
")",
";",
"result",
"[",
"i",
"]",
"=",
"math",
"abs",
"(",
"initval",
"%",
"max",
"value",
")",
";",
"}",
"return",
"result",
";",
"}"
] |
[
"callback",
"for",
"the",
"response",
"of",
"the",
"list",
"offset",
"call",
"above"
] | [
"private",
"void",
"handle",
"list",
"offset",
"response",
"(",
"list",
"offsets",
"response",
"list",
"offsets",
"response",
",",
"request",
"future",
"<",
"list",
"offset",
"result",
">",
"future",
")",
"{",
"map",
"<",
"topic",
"partition",
",",
"list",
"offset",
"data",
">",
"fetched",
"offsets",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"set",
"<",
"topic",
"partition",
">",
"partitions",
"to",
"retry",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"set",
"<",
"string",
">",
"unauthorized",
"topics",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"for",
"(",
"list",
"offsets",
"topic",
"response",
"topic",
":",
"list",
"offsets",
"response",
"topics",
"(",
")",
")",
"{",
"for",
"(",
"list",
"offsets",
"partition",
"response",
"partition",
":",
"topic",
"partitions",
"(",
")",
")",
"{",
"topic",
"partition",
"topic",
"partition",
"=",
"new",
"topic",
"partition",
"(",
"topic",
"name",
"(",
")",
",",
"partition",
"partition",
"index",
"(",
")",
")",
";",
"errors",
"error",
"=",
"errors",
"for",
"code",
"(",
"partition",
"error",
"code",
"(",
")",
")",
";",
"switch",
"(",
"error",
")",
"{",
"case",
"none",
":",
"if",
"(",
"!",
"partition",
"old",
"style",
"offsets",
"(",
")",
"is",
"empty",
"(",
")",
")",
"{",
"/",
"/",
"handle",
"v",
"0",
"response",
"with",
"offsets",
"long",
"offset",
";",
"if",
"(",
"partition",
"old",
"style",
"offsets",
"(",
")",
"size",
"(",
")",
">",
"1",
")",
"{",
"future",
"raise",
"(",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"unexpected",
"partition",
"data",
"response",
"of",
"length",
"\"",
"+",
"partition",
"old",
"style",
"offsets",
"(",
")",
"size",
"(",
")",
")",
")",
";",
"return",
";",
"}",
"else",
"{",
"offset",
"=",
"partition",
"old",
"style",
"offsets",
"(",
")",
"get",
"(",
"0",
")",
";",
"}",
"log",
"debug",
"(",
"\"",
"handling",
"v",
"0",
"list",
"offset",
"response",
"response",
"for",
"{",
"}",
"fetched",
"offset",
"{",
"}",
"\"",
",",
"topic",
"partition",
",",
"offset",
")",
";",
"if",
"(",
"offset",
"!",
"=",
"list",
"offsets",
"response",
"unknown",
"offset",
")",
"{",
"list",
"offset",
"data",
"offset",
"data",
"=",
"new",
"list",
"offset",
"data",
"(",
"offset",
",",
"null",
",",
"optional",
"empty",
"(",
")",
")",
";",
"fetched",
"offsets",
"put",
"(",
"topic",
"partition",
",",
"offset",
"data",
")",
";",
"}",
"}",
"else",
"{",
"/",
"/",
"handle",
"v",
"1",
"and",
"later",
"response",
"or",
"v",
"0",
"without",
"offsets",
"log",
"debug",
"(",
"\"",
"handling",
"list",
"offset",
"response",
"response",
"for",
"{",
"}",
"fetched",
"offset",
"{",
"}",
",",
"timestamp",
"{",
"}",
"\"",
",",
"topic",
"partition",
",",
"partition",
"offset",
"(",
")",
",",
"partition",
"timestamp",
"(",
")",
")",
";",
"if",
"(",
"partition",
"offset",
"(",
")",
"!",
"=",
"list",
"offsets",
"response",
"unknown",
"offset",
")",
"{",
"optional",
"<",
"integer",
">",
"leader",
"epoch",
"=",
"(",
"partition",
"leader",
"epoch",
"(",
")",
"=",
"=",
"list",
"offsets",
"response",
"unknown",
"epoch",
")",
"?",
"optional",
"empty",
"(",
")",
":",
"optional",
"of",
"(",
"partition",
"leader",
"epoch",
"(",
")",
")",
";",
"list",
"offset",
"data",
"offset",
"data",
"=",
"new",
"list",
"offset",
"data",
"(",
"partition",
"offset",
"(",
")",
",",
"partition",
"timestamp",
"(",
")",
",",
"leader",
"epoch",
")",
";",
"fetched",
"offsets",
"put",
"(",
"topic",
"partition",
",",
"offset",
"data",
")",
";",
"}",
"}",
"break",
";",
"case",
"unsupported",
"for",
"message",
"format",
":",
"/",
"/",
"the",
"message",
"format",
"on",
"the",
"broker",
"side",
"is",
"before",
"0",
"10",
"0",
",",
"which",
"means",
"it",
"does",
"not",
"/",
"/",
"support",
"timestamps",
"we",
"treat",
"this",
"case",
"the",
"same",
"as",
"if",
"we",
"weren",
"'",
"t",
"able",
"to",
"find",
"an",
"/",
"/",
"offset",
"corresponding",
"to",
"the",
"requested",
"timestamp",
"and",
"leave",
"it",
"out",
"of",
"the",
"result",
"log",
"debug",
"(",
"\"",
"cannot",
"search",
"by",
"timestamp",
"for",
"partition",
"{",
"}",
"because",
"the",
"message",
"format",
"version",
"\"",
"+",
"\"",
"is",
"before",
"0",
"10",
"0",
"\"",
",",
"topic",
"partition",
")",
";",
"break",
";",
"case",
"not",
"leader",
"or",
"follower",
":",
"case",
"replica",
"not",
"available",
":",
"case",
"kafka",
"storage",
"error",
":",
"case",
"offset",
"not",
"available",
":",
"case",
"leader",
"not",
"available",
":",
"case",
"fenced",
"leader",
"epoch",
":",
"case",
"unknown",
"leader",
"epoch",
":",
"log",
"debug",
"(",
"\"",
"attempt",
"to",
"fetch",
"offsets",
"for",
"partition",
"{",
"}",
"failed",
"due",
"to",
"{",
"}",
",",
"retrying",
"\"",
",",
"topic",
"partition",
",",
"error",
")",
";",
"partitions",
"to",
"retry",
"add",
"(",
"topic",
"partition",
")",
";",
"break",
";",
"case",
"unknown",
"topic",
"or",
"partition",
":",
"log",
"warn",
"(",
"\"",
"received",
"unknown",
"topic",
"or",
"partition",
"error",
"in",
"list",
"offset",
"request",
"for",
"partition",
"{",
"}",
"\"",
",",
"topic",
"partition",
")",
";",
"partitions",
"to",
"retry",
"add",
"(",
"topic",
"partition",
")",
";",
"break",
";",
"case",
"topic",
"authorization",
"failed",
":",
"unauthorized",
"topics",
"add",
"(",
"topic",
"partition",
"topic",
"(",
")",
")",
";",
"break",
";",
"default",
":",
"log",
"warn",
"(",
"\"",
"attempt",
"to",
"fetch",
"offsets",
"for",
"partition",
"{",
"}",
"failed",
"due",
"to",
"unexpected",
"exception",
":",
"{",
"}",
",",
"retrying",
"\"",
",",
"topic",
"partition",
",",
"error",
"message",
"(",
")",
")",
";",
"partitions",
"to",
"retry",
"add",
"(",
"topic",
"partition",
")",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"unauthorized",
"topics",
"is",
"empty",
"(",
")",
")",
"future",
"raise",
"(",
"new",
"topic",
"authorization",
"exception",
"(",
"unauthorized",
"topics",
")",
")",
";",
"else",
"future",
"complete",
"(",
"new",
"list",
"offset",
"result",
"(",
"fetched",
"offsets",
",",
"partitions",
"to",
"retry",
")",
")",
";",
"}"
] |
[
"implementations",
"must",
"implement",
"this",
"method",
"to",
"process",
"each",
"row",
"of",
"data",
"in",
"the",
"result",
"set",
"this",
"method",
"should",
"not",
"call",
"{",
"@",
"code",
"next",
"(",
")",
"}",
"on",
"the",
"result",
"set",
";",
"it",
"is",
"only",
"supposed",
"to",
"extract",
"values",
"of",
"the",
"current",
"row",
"exactly",
"what",
"the",
"implementation",
"chooses",
"to",
"do",
"is",
"up",
"to",
"it",
":",
"a",
"trivial",
"implementation",
"might",
"simply",
"count",
"rows",
",",
"while",
"another",
"implementation",
"might",
"build",
"an",
"xml",
"document"
] | [
"void",
"process",
"row",
"(",
"result",
"set",
"rs",
")",
"throws",
"s",
"q",
"l",
"exception",
";"
] |
[
"called",
"when",
"the",
"processor",
"is",
"configured",
"for",
"a",
"new",
"input",
"format"
] | [
"protected",
"audio",
"format",
"on",
"configure",
"(",
"audio",
"format",
"input",
"audio",
"format",
")",
"throws",
"unhandled",
"audio",
"format",
"exception",
"{",
"return",
"audio",
"format",
"not",
"set",
";",
"}"
] |
[
"dump",
"snapshots",
"to",
"file"
] | [
"public",
"static",
"file",
"dump",
"(",
"profiled",
"basic",
"info",
"basic",
"info",
",",
"module",
"manager",
"manager",
")",
"throws",
"i",
"o",
"exception",
"{",
"i",
"profile",
"thread",
"snapshot",
"query",
"d",
"a",
"o",
"snapshot",
"query",
"d",
"a",
"o",
"=",
"manager",
"find",
"(",
"storage",
"module",
"name",
")",
"provider",
"(",
")",
"get",
"service",
"(",
"i",
"profile",
"thread",
"snapshot",
"query",
"d",
"a",
"o",
"class",
")",
";",
"list",
"<",
"profiled",
"basic",
"info",
"sequence",
"range",
">",
"sequence",
"ranges",
"=",
"basic",
"info",
"build",
"sequence",
"ranges",
"(",
")",
";",
"int",
"range",
"count",
"=",
"sequence",
"ranges",
"size",
"(",
")",
";",
"string",
"segment",
"id",
"=",
"basic",
"info",
"get",
"segment",
"id",
"(",
")",
";",
"file",
"snapshot",
"file",
"=",
"new",
"file",
"(",
"basic",
"info",
"get",
"config",
"(",
")",
"get",
"analyze",
"result",
"dist",
"(",
")",
"+",
"file",
"separator",
"+",
"\"",
"snapshot",
"data",
"\"",
")",
";",
"/",
"/",
"reading",
"data",
"and",
"write",
"to",
"file",
"try",
"(",
"output",
"stream",
"output",
"stream",
"=",
"new",
"buffered",
"output",
"stream",
"(",
"new",
"file",
"output",
"stream",
"(",
"snapshot",
"file",
")",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"range",
"count",
";",
"i",
"+",
"+",
")",
"{",
"list",
"<",
"profile",
"thread",
"snapshot",
"record",
">",
"records",
"=",
"query",
"snapshot",
"(",
"segment",
"id",
",",
"snapshot",
"query",
"d",
"a",
"o",
",",
"sequence",
"ranges",
"get",
"(",
"i",
")",
")",
";",
"for",
"(",
"profile",
"thread",
"snapshot",
"record",
"record",
":",
"records",
")",
"{",
"/",
"/",
"transform",
"to",
"proto",
"data",
"and",
"save",
"it",
"thread",
"snapshot",
"new",
"builder",
"(",
")",
"set",
"stack",
"(",
"thread",
"stack",
"parse",
"from",
"(",
"record",
"get",
"stack",
"binary",
"(",
")",
")",
")",
"set",
"sequence",
"(",
"record",
"get",
"sequence",
"(",
")",
")",
"set",
"time",
"(",
"record",
"get",
"dump",
"time",
"(",
")",
")",
"build",
"(",
")",
"write",
"delimited",
"to",
"(",
"output",
"stream",
")",
";",
"}",
"/",
"/",
"print",
"process",
"log",
"if",
"need",
"if",
"(",
"(",
"i",
">",
"0",
"&",
"&",
"i",
"%",
"query",
"profile",
"write",
"process",
"log",
"=",
"=",
"0",
")",
"|",
"|",
"i",
"=",
"=",
"range",
"count",
"-",
"1",
")",
"{",
"log",
"info",
"(",
"\"",
"dump",
"snapshots",
"process",
":",
"[",
"{",
"}",
"/",
"{",
"}",
"]",
":",
"{",
"}",
"%",
"\"",
",",
"i",
"+",
"1",
",",
"range",
"count",
",",
"(",
"int",
")",
"(",
"(",
"double",
")",
"(",
"i",
"+",
"1",
")",
"/",
"range",
"count",
"*",
"100",
")",
")",
";",
"}",
"}",
"}",
"return",
"snapshot",
"file",
";",
"}"
] |
[
"called",
"when",
"the",
"player",
"starts",
"or",
"stops",
"playing"
] | [
"default",
"void",
"on",
"is",
"playing",
"changed",
"(",
"event",
"time",
"event",
"time",
",",
"boolean",
"is",
"playing",
")",
"{",
"}"
] |
[
"convert",
"a",
"string",
"to",
"a",
"path",
"and",
"gracefully",
"remove",
"fragmentsqueries",
"if",
"they",
"exist",
"in",
"the",
"string"
] | [
"path",
"string",
"to",
"path",
"(",
"string",
"s",
")",
"{",
"try",
"{",
"uri",
"uri",
"=",
"new",
"uri",
"(",
"s",
")",
";",
"return",
"new",
"path",
"(",
"uri",
"get",
"scheme",
"(",
")",
",",
"uri",
"get",
"authority",
"(",
")",
",",
"uri",
"get",
"path",
"(",
")",
")",
";",
"}",
"catch",
"(",
"u",
"r",
"i",
"syntax",
"exception",
"e",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"error",
"parsing",
"argument",
"\"",
"+",
"\"",
"argument",
"must",
"be",
"a",
"valid",
"uri",
":",
"\"",
"+",
"s",
",",
"e",
")",
";",
"}",
"}"
] |
[
"returns",
"the",
"stripped",
"file",
"(",
"the",
"explicit",
"\"",
"stripped",
"\"",
"target",
")"
] | [
"public",
"final",
"artifact",
"get",
"stripped",
"artifact",
"(",
")",
"{",
"return",
"stripped",
"artifact",
";",
"}"
] |
[
"called",
"after",
"a",
"{",
"@",
"linkplain",
"run",
"#",
"on",
"load",
"build",
"is",
"loaded",
"}",
"to",
"which",
"this",
"action",
"was",
"previously",
"{",
"@",
"linkplain",
"#",
"on",
"attached",
"attached",
"}"
] | [
"void",
"on",
"load",
"(",
"run",
"<",
"?",
",",
"?",
">",
"r",
")",
";"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.